Route kebab Customize through the prefilled policy wizard so existing methods and values can be renamed, reordered, and kept in that field order on the card after Finalize.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,6 +14,9 @@ import { isCustomMethodCardId } from "./isCustomMethodCardId";
|
||||
* stubs keep the facet's structured edit fields until the user adds blocks (then this
|
||||
* returns true once persisted blocks are non-empty).
|
||||
*
|
||||
* Non-empty **draft** blocks also win, including catalog ids after Customize
|
||||
* Finalize (facet editors ignore array order).
|
||||
*
|
||||
* **View mode** (`modalEditUnlocked` false): when the custom card still has facet copy
|
||||
* that matches preset seeds only (see `./methodCardFacetMatchesPresetForId`), route to
|
||||
* {@link CustomMethodCardModalBody} so meta-only wizard cards show policy copy instead
|
||||
@@ -33,16 +36,15 @@ export function usesWizardFieldBlocksModalBody(args: {
|
||||
if (Array.isArray(persisted) && persisted.length > 0) {
|
||||
return true;
|
||||
}
|
||||
if (!isCustomMethodCardId(args.methodId, args.meta)) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
args.modalEditUnlocked &&
|
||||
args.draftFieldBlocks !== null &&
|
||||
args.draftFieldBlocks.length > 0
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
if (!isCustomMethodCardId(args.methodId, args.meta)) {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
!args.modalEditUnlocked && args.customFacetDetailsMatchPreset === true
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user