Keep a category's custom colour when filing it into a group - #185
Merged
Conversation
Filing a category used to default the "Use the group's colour" switch to on for everyone, which silently replaced a deliberately chosen custom colour with the group's role. Now: - The category's Add-to-group sheet starts the switch off when the category has a hex colour (fixed swatch or custom picker), with the subtitle explaining that turning it on replaces the custom colour. Categories on theme roles keep the previous on-by-default behaviour. - The group card's add-member sheet has one switch for many categories, so custom-coloured categories are protected per pick: they keep their colour even with the switch on (the subtitle says so). Adopting for such a category remains possible from its own Add-to-group sheet. - New helper isFixedColorToken covers both fixed swatches and custom picker colours (isCustomColorToken deliberately excludes swatches; a chosen swatch is just as much a deliberate colour). The length check alone is insufficient because "tertiary" is also 8 characters. CategoryEditScreen needed no change: editing derives the switch from the stored token and creation hides the picker while the switch is on. Verified: a11y_check.py, wcag_check.py, and the semantics-import sweep all clean; changelog fragment added (patch). Claude-Session: https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg Co-authored-by: Claude <noreply@anthropic.com>
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.
Filing a category into a group defaulted the "Use the group's colour" switch to on for everyone, silently replacing a deliberately chosen custom colour with the group's role. Requested by the owner: do not immediately override a defined custom colour.
What changed
isFixedColorTokenhelper: treats any 8-char hex token as a deliberate colour, covering the fixed swatches that the existingisCustomColorTokendeliberately excludes. (The length check alone is insufficient because "tertiary" is also 8 characters.)CategoryEditScreenneeded no change: editing already derives the switch from the stored token, and creation hides the colour picker while the switch is on, so no silent override exists there.Verification
a11y_check.pyclean,wcag_check.pypasses, semantics-import sweep clean.patch).🤖 Generated with Claude Code
https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg
Generated by Claude Code