Let decision-approaches wrap at narrow widths and sync key-resource scopes.
The info-box checkboxes overflowed in a squeezed column; wrapping them and offering those scopes as chips on every approach keeps the sidebar and Applicable Scope selection in sync without publishing unchecked keys as defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,6 +35,10 @@ import {
|
||||
decisionApproachPresetFor,
|
||||
membershipPresetFor,
|
||||
} from "../../../../lib/create/finalReviewChipPresets";
|
||||
import {
|
||||
applyDecisionApproachKeyResources,
|
||||
selectedKeyResourceLabelsFromCheckedIds,
|
||||
} from "../../../../lib/create/decisionApproachKeyResources";
|
||||
import { isCustomMethodCardId } from "../../../../lib/create/isCustomMethodCardId";
|
||||
import { usesWizardFieldBlocksModalBody } from "../../../../lib/create/usesWizardFieldBlocksModalBody";
|
||||
import type { CustomMethodCardFieldBlock } from "../../../../lib/create/customMethodCardFieldBlocks";
|
||||
@@ -1266,6 +1270,7 @@ function facetSeedSignature(
|
||||
return JSON.stringify({
|
||||
meta: state.customMethodCardMetaById?.[id] ?? null,
|
||||
details: state.decisionApproachDetailsById?.[id] ?? null,
|
||||
keyResources: state.selectedDecisionKeyResourceIds ?? null,
|
||||
blocks: state.customMethodCardFieldBlocksById?.[id] ?? null,
|
||||
});
|
||||
case "conflictManagement":
|
||||
@@ -1330,12 +1335,18 @@ function seedDraftForTarget(
|
||||
const saved =
|
||||
state.decisionApproachDetailsById?.[target.overrideKey] ??
|
||||
decisionApproachPresetFor(target.overrideKey);
|
||||
const withKeys = applyDecisionApproachKeyResources(
|
||||
saved,
|
||||
selectedKeyResourceLabelsFromCheckedIds(
|
||||
state.selectedDecisionKeyResourceIds ?? [],
|
||||
),
|
||||
);
|
||||
return {
|
||||
groupKey: "decisionApproaches",
|
||||
value: {
|
||||
...saved,
|
||||
applicableScope: [...saved.applicableScope],
|
||||
selectedApplicableScope: [...saved.selectedApplicableScope],
|
||||
...withKeys,
|
||||
applicableScope: [...withKeys.applicableScope],
|
||||
selectedApplicableScope: [...withKeys.selectedApplicableScope],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user