Skip to content
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
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

feat: expanded tag color system #709

wants to merge 22 commits into from

Conversation

CyanVoxel
Copy link
Member

@CyanVoxel CyanVoxel commented Jan 17, 2025

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 associated slug ID. Namespaces must be unique, and slugs only need to be unique within their respective namespace. This system has the following advantages:

  1. Built-in TagStudio tag colors can be completely separated from user colors
  2. This system allows for colors to be shared between libraries, unlike a traditional incrementing ID system
  3. Built-in TagStudio tag colors can be further organized into different reserved namespaces

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.

image
image


Closes #623, Progress towards #264

@CyanVoxel 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 CyanVoxel added this to the Alpha v9.5 (Post-SQL) milestone Jan 17, 2025
@CyanVoxel CyanVoxel changed the title feat: custom user-defined tag colors feat: expanded tag color system Jan 22, 2025
@CyanVoxel CyanVoxel marked this pull request as ready for review January 22, 2025 19:25
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
Projects
Status: 🏓 Ready for Review
Development

Successfully merging this pull request may close these issues.

1 participant