Repository navigation
Add configurable tag style rules - #1640
Open
killecaptron wants to merge 1 commit into
Open
killecaptron wants to merge 1 commit into
killecaptron wants to merge 1 commit into
Conversation
Tags are a free-form, flat list, and every tag looked the same, so a list of parts with a dozen tags per row gave no visual grouping at all - even though tags are usually used in namespaces like "Risk:High" or "Project:Foo". An administrator can now define an ordered list of rules in the system settings, which map a tag (exactly, or by prefix) to one of the semantic Bootstrap colors. Tags which do not match any rule keep their previous appearance, and only the color of a tag changes - filtering and searching by tags are untouched. At most one rule is applied per tag: an exact rule wins over a prefix rule, the longest matching prefix wins among prefix rules, and the first configured rule wins any remaining tie. The rules are resolved in one place, so tags look the same in the part tables and on the part page. Each rule row previews itself while it is edited. The rules only take effect once the settings are saved, so a row which showed a fixed word in the stored color gave no feedback about what is being typed: the badge now shows the entered tag in the chosen color, a prefix rule marks itself with an ellipsis, and a sentence below the row spells out what the selected match type will match. That sentence is also the answer to "exact or prefix?", which the two words alone do not explain. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Tags are a free-form, flat list, and every tag looks the same, so a list of parts with a dozen tags per row
gives no visual grouping at all - even though tags are usually used in namespaces like
Risk:HighorProject:Foo.An administrator can now define an ordered list of rules under System settings → Tag styles, which map a tag
(exactly, or by prefix) to one of the semantic Bootstrap colors. Tags which do not match any rule keep their
previous appearance, and only the color of a tag changes - filtering and searching by tags are untouched.
At most one rule is applied per tag: an exact rule wins over a prefix rule, the longest matching prefix wins
among prefix rules, and the first configured rule wins any remaining tie. The rules are resolved in one place,
so tags look the same in the part tables and on the part page.
Each rule row previews itself while it is edited. The rules only take effect once the settings are saved, so a
row which showed a fixed word in the stored color gave no feedback about what is being typed: the badge now
shows the entered tag in the chosen color, a prefix rule marks itself with an ellipsis, and the badge explains
what the selected match type will match. That is also the answer to "exact or prefix?", which the two words
alone do not explain.
Documented in
docs/usage/tag_styles.md.🤖 Generated with Claude Code