Skip to content

Keep a category's custom colour when filing it into a group - #185

Merged
mapgie merged 2 commits into
mainfrom
claude/group-adopt-color-keep-custom
Aug 26, 2026
Merged

Keep a category's custom colour when filing it into a group#185
mapgie merged 2 commits into
mainfrom
claude/group-adopt-color-keep-custom

Conversation

@mapgie

@mapgie mapgie commented Aug 26, 2026

Copy link
Copy Markdown
Owner

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

  • Category's Add-to-group sheet: the switch now starts off when the category's stored token is a hex colour (fixed swatch or custom picker colour), and its subtitle explains that turning it on replaces the custom colour with the group's role. Categories on theme roles keep the previous on-by-default behaviour (a role token cannot be distinguished from the never-touched default, and adopting is harmless there since both re-theme).
  • Group card's add-member sheet: one switch covers many candidates, so custom-coloured categories are protected per pick: they keep their colour even when the switch is on, and the subtitle says so. Opting such a category into the group colour remains one tap away in its own Add-to-group sheet.
  • New isFixedColorToken helper: treats any 8-char hex token as a deliberate colour, covering the fixed swatches that the existing isCustomColorToken deliberately excludes. (The length check alone is insufficient because "tertiary" is also 8 characters.)
  • CategoryEditScreen needed 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.py clean, wcag_check.py passes, semantics-import sweep clean.
  • No en or em dashes in the new user-facing strings.
  • Changelog fragment added (patch).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PZJLynVBkgLtehJFXffnfg


Generated by Claude Code

claude and others added 2 commits August 26, 2026 21:59
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>
@mapgie
mapgie marked this pull request as ready for review August 26, 2026 23:14
@mapgie
mapgie merged commit 1e5e400 into main Aug 26, 2026
@mapgie
mapgie deleted the claude/group-adopt-color-keep-custom branch August 26, 2026 23:14
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.

2 participants