Repository navigation
Invert Switcher hideLabel when migrating to showLabels - #334
Merged
KevinJump merged 1 commit intoNov 6, 2026
Merged
Conversation
Switcher's hideLabel and True/False's showLabels mean opposite things, so renaming the key flipped the setting. Negate the value instead. Refs Jumoo#306
Member
|
Thanks John, nice catch, and thanks for checking all the value formats. Merged into v17/main; it'll go forward to v18 with the next merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Closes #306
Switcher's
hideLabeland True/False'sshowLabelsmean opposite things, but the migrator just renamed the key, so hidden labels showed after migration and the other way round. It now negates the value before renaming the other keys.Notes for the reviewer
The value goes through
ToString().TryConvertTo<bool>(), so bool, "1"/"0", "true"/"false" and JsonElement/JsonNode all work. If it can't be parsed,showLabelsis left out and the editor default applies.There's no test project, so I checked it with a throwaway console app against the Migrators project: true/"1"/"true"/JsonElement true gave
showLabels=False, false/"0"/"False"/JsonNode false gaveshowLabels=True, junk or missing left it out, and the label keys were renamed as before.Checklist
dotnet build src/uSync.Migrations.slnx -c Releaseis cleanCHANGELOG.mdupdated under UnreleaseduSync.Migrations.Site, not just built