-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expanded tag color system #709
Open
CyanVoxel
wants to merge
22
commits into
main
Choose a base branch
from
custom-tag-colors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
CyanVoxel
added
Type: Enhancement
New feature or request
Type: Refactor
Code that needs to be restructured or cleaned up
Priority: High
An important issue requiring attention
TagStudio: Tags
Relating to the TagStudio tag system
labels
Jan 17, 2025
CyanVoxel
changed the title
feat: custom user-defined tag colors
feat: expanded tag color system
Jan 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Priority: High
An important issue requiring attention
TagStudio: Tags
Relating to the TagStudio tag system
Type: Enhancement
New feature or request
Type: Refactor
Code that needs to be restructured or cleaned up
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
This PR adds a new expanded tag color system and lays the foundation for user-created tag colors. Instead of colors being stored as strings or enums, tag colors are now represented by a
namespace
and associatedslug
ID. Namespaces must be unique, and slugs only need to be unique within their respective namespace. This system has the following advantages:In addition, tag colors now have "primary" and optional "secondary" colors. Primary colors are used as the default base color of the tag, with text and border colors being derived from this. Secondary colors are optional and replace the border and text colors with a specific value. These secondary colors can be seen with the new "Neon" tag color group. Several other new tag colors have been added, and some have either been renamed or consolidated. This is most notable with the changes made to "Blue Violet", "Violet", and "Purple" which have been consolidated into "Indigo" and "Purple", with JSON "Blue Violet" now mapping to the new "Navy" color.
Finally, a new color selection modal has been added which replaces the old color name combobox. This provides a much cleaner visual approach to selecting colors, which will also serve as the home for user-created colors.
This framework should mean that the only thing left for user-created colors would be a proper UI for creating and editing these tag color groups. Furthermore, it wouldn't take too much work on top of this to enable the importing and exporting of tag color packs, once a sharable format for those is decided upon.
Closes #623, Progress towards #264