Repository navigation
feat: add an instance-wide table color mode and tag more table columns - #1857
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5
Admins choose tags, colored text or no color under UI Preferences in the application settings, and every ColorTagCell draws in that mode. The forms view Kind, audit log Action, group Type and remote assignment Status columns become tags, so they follow the setting too. Co-Authored-By: Claude Opus 5.5
…or-tags Co-Authored-By: Claude Opus 5.5
…abels Send Email moves from cyan to fuchsia because its dot read as Unarchive's teal in light mode. The stored mode values stay as they are, so saved settings keep working under the new Coloured text and Disabled labels. Co-Authored-By: Claude Opus 5.5
…or-tags Co-Authored-By: Claude Opus 5.5
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.
Summary
Tables tinted some values and left others plain. Colored table values now go through
ColorTagCell, and an admin chooses how they are drawn across the whole instance./admin/users/admin/instruments, series/admin/users/$userId, permissions/admin/instruments, forms/admin/audit/logs/admin/groups/datahub/subjects, datahub instruments, repo sync logAlso:
SetupState.tableColorModeis a new optional Prisma enum field. An existing document reads astags, so no migration is needed.filland atextvalue. Pastel sex colors stay on dots, and light-mode text uses a darker pink and blue.w-full max-w-4xl, and "Preferences" is renamed "UI Preferences".nonemode.Left as is: the amber "No effect" chip in the permissions table, which is a warning rather than a table value.
Evidence
PATCH /v1/setup, and the table redraws in each mode.ColorTagCell.test.tsx,SelectTableColorMode.test.tsx,tag-colors.test.ts(4.5:1 text contrast on a card in both themes),settings.test.tsx,setup.service.test.ts,setup.test.ts, plus each table's own testadmin-settings.spec.ts(save each mode, read/admin/users),admin-instruments.spec.ts,admin-audit-logs.spec.ts,admin-management.spec.tsLocal runs:
pnpm lint: 34/34, twice.pnpm test:coverage: 100%.pnpm test:e2e: 351 of 352 passed.record-file-deletion.spec.tsfails on a bare local stack with no S3 backend. This run predates the final merge frommain, which CI covers.The author reviewed the main table views in the browser. Dark-mode colors are covered only by the contrast test, not by an e2e test.
Merge Danger
Door: two-way
The new field is optional and needs no migration. After a rollback the old code ignores the stored value, so no cleanup is needed, and upgrading again restores the saved choice. A later rename or removal of a stored mode value would need a data migration, because Prisma would likely fail reading the old value.
Blast Radius: cosmetic
The setting applies to every user on the instance. An open session keeps the old mode until it reloads, because setup state has
staleTime: Infinity.Co-Authored-By: Claude Opus 5.5