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

🐛 Display tags color upon their category #745

Merged
merged 1 commit into from
Mar 28, 2023
Merged

🐛 Display tags color upon their category #745

merged 1 commit into from
Mar 28, 2023

Conversation

gildub
Copy link
Contributor

@gildub gildub commented Mar 20, 2023

PF Label support the following 8 colors "gold" | "red" | "blue" | "cyan" | "green" | "orange" | "purple" | "grey" .
Tag colors depends upon their TagCategory colors which are defined as either keyword names (blue, etc) or hexadecimal values (for the recent ones V3).

Therefore depending on the color of the tag the Label can be displayed with a supported color or will fall back to "grey" (Label default) when not supported.

LabelCustomColor from migtools/lib-ui wraps Label to make tag color supported through CSS properties.

image

Resolves https://issues.redhat.com/browse/MTA-332

@gildub gildub requested a review from ibolton336 March 20, 2023 21:33
@gildub gildub self-assigned this Mar 20, 2023
@gildub gildub requested a review from mturley March 20, 2023 21:56
Copy link
Member

@ibolton336 ibolton336 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to rethink this one together. Probably will need input from UXD and Ramon here.

@mturley
Copy link
Collaborator

mturley commented Mar 21, 2023

This might help :) migtools/lib-ui#125

@gildub gildub changed the title 🐛 Alternate gold/red color for tag sources 🐛 Display tags color upon their category Mar 23, 2023
@gildub gildub requested a review from ibolton336 March 23, 2023 07:40
@gildub
Copy link
Contributor Author

gildub commented Mar 28, 2023

@mturley, thanks and nice work with the migtools/lib-ui wrapper.
Good luck with the backend change in that regard.

@@ -222,22 +223,19 @@ export const ApplicationTags: React.FC<ApplicationTagsProps> = ({
</Text>
</TextContent>
<Flex>
{tagsInThisCategoryInThisSource
?.sort((a, b) => a.name.localeCompare(b.name))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gildub why remove the sorting here?

Copy link
Collaborator

@mturley mturley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left a question we can follow up on later.

@mturley mturley dismissed ibolton336’s stale review March 28, 2023 18:47

Was addressed

@mturley mturley merged commit e6da82e into konveyor:main Mar 28, 2023
mturley pushed a commit to mturley/tackle2-ui that referenced this pull request Mar 31, 2023
mturley added a commit that referenced this pull request Mar 31, 2023
* Use LabelCustomColor from migtools/lib-ui (#745)

Signed-off-by: Gilles Dubreuil <[email protected]>

* ✨ Expand tag category color palette to 16 colors, add deterministic fallback colors for tag categories (#781)

* Add deterministic fallback colors for tag categories

Signed-off-by: Mike Turley <[email protected]>

* Tweak colors, add named constants, TODO

Signed-off-by: Mike Turley <[email protected]>

* Use new color palette in all tag-related color selections

Signed-off-by: Mike Turley <[email protected]>

* Add comment

Signed-off-by: Mike Turley <[email protected]>

* Update snapshots

Signed-off-by: Mike Turley <[email protected]>

---------

Signed-off-by: Mike Turley <[email protected]>

---------

Signed-off-by: Gilles Dubreuil <[email protected]>
Signed-off-by: Mike Turley <[email protected]>
Co-authored-by: Gilles Dubreuil <[email protected]>
@gildub gildub deleted the issue-mta-332 branch April 12, 2023 13:07
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.

3 participants