diff --git a/src/app/features/project-editor/sections/features-section.component.html b/src/app/features/project-editor/sections/features-section.component.html index 53e87fd..ff3feb2 100644 --- a/src/app/features/project-editor/sections/features-section.component.html +++ b/src/app/features/project-editor/sections/features-section.component.html @@ -1,8 +1,8 @@ @if (bootstrap(); as bootstrap) {
- - + + diff --git a/src/app/features/project-editor/sections/features-section.component.ts b/src/app/features/project-editor/sections/features-section.component.ts index e0c25ab..254d8c2 100644 --- a/src/app/features/project-editor/sections/features-section.component.ts +++ b/src/app/features/project-editor/sections/features-section.component.ts @@ -45,6 +45,25 @@ export class ProjectEditorFeaturesSectionComponent { this.facade.updateBootstrap(current => ({ ...current, featureFlags: { ...current.featureFlags, [key]: checked } })); } + /** + * Wishlist/compare visibility is gated by featureFlags AND + * userExperience..enabled at runtime (see FeatureConfigService). + * The editor only exposes one toggle per feature, so it must keep both + * flags in sync - otherwise a stray userExperience..enabled=false + * (e.g. from an older export) leaves the toggle looking "on" with no way + * to fix it from this screen. + */ + toggleFeatureAndUserExperience(key: 'wishlist' | 'compare', checked: boolean): void { + this.facade.updateBootstrap(current => ({ + ...current, + featureFlags: { ...current.featureFlags, [key]: checked }, + userExperience: { + ...current.userExperience, + [key]: { ...current.userExperience?.[key], enabled: checked } + } + })); + } + toggleUserExperience(path: 'recentlyViewed' | 'wishlist' | 'compare', checked: boolean): void { this.facade.updateBootstrap(current => ({ ...current,