Skip to content

Default Standards palette on when setting is absent (#3408)#3536

Merged
vchelaru merged 1 commit into
mainfrom
3408-standards-default
Jul 7, 2026
Merged

Default Standards palette on when setting is absent (#3408)#3536
vchelaru merged 1 commit into
mainfrom
3408-standards-default

Conversation

@vchelaru

@vchelaru vchelaru commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Closes #3408.

What

Flip the default so the Standards palette is on for users who have never made an explicit choice, while keeping the View-menu toggle able to turn it off.

Implements the issue's recommended Option 1 (nullable backing field):

  • GeneralSettingsFile.UseStandardsPalette is now bool?. null = never chosen; a non-null value = the user's explicit choice.
  • New EffectiveUseStandardsPalette => UseStandardsPalette ?? true centralizes the "absent → on" resolution. The constructor no longer forces false, so a fresh settings object (and any file lacking the element) resolves to on.
  • The three tree-view read sites (ApplyStandardsPaletteMode, CreateRootTreeNodesIfNecessary, the refresh-chips path) and the View-menu checkbox now read EffectiveUseStandardsPalette. Object-null (settings not yet loaded) still falls back to the classic tree, unchanged.
  • The menu toggle still writes a concrete true/false, so View → Standards palette can turn it off, and an opt-out survives the default flip.

Known limitation (by design, per the issue)

UseStandardsPalette shipped as a non-nullable bool in #3404, so every user who launched a palette-capable build and saved settings already has <UseStandardsPalette>false</UseStandardsPalette> auto-written. Those users are indistinguishable from an explicit opt-out and will not flip to on — only users whose file lacks the element (fresh installs / never-saved) get the new default. This is the "explicitly opted out stays out" trade-off the issue chose Option 1 for. Flipping the auto-false cohort too would require the heavier Option 2 (one-time migration).

Tests

GeneralSettingsFileTests (new): resolution of null/false/true → effective value, the constructor default (null → on), and an XML round-trip proving an absent element resolves to on while a written value is honored. Red-first verified by inverting ?? true?? false (3 cases went red). Full GumFull.sln builds clean; menu/tree-view/composition suites green (35/35).

Make GeneralSettingsFile.UseStandardsPalette nullable (bool?): null means the user has never chosen and resolves to on via the new EffectiveUseStandardsPalette; an explicit true/false (written by the View-menu toggle) is honored, so a user who opted out stays out. The tree-view read sites and the menu checkbox now read EffectiveUseStandardsPalette.

The menu toggle still writes a concrete true/false, so the palette can still be turned off from View > Standards palette.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vchelaru vchelaru merged commit 39d8926 into main Jul 7, 2026
5 checks passed
@vchelaru vchelaru deleted the 3408-standards-default branch July 7, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default the Standards palette on when the UseStandardsPalette setting is absent

1 participant