Skip to content

DataTag component - #382

Open
gfrn wants to merge 6 commits into
mainfrom
feature/data-tag
Open

gfrn wants to merge 6 commits into
mainfrom
feature/data-tag

Conversation

@gfrn

@gfrn gfrn commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator
image

This adds a component we've been using in Evo/PATo/SynchWeb quite extensively, which we call DataTag

It's a compact version of a DataCard, for displaying data in situations where density is paramount, or there is simply not enough space. It features icons, allows users to set their own logic for displaying highlight colours, and provides "shortcuts" for handling numbers or performing basic transformations.

It also comes with a complementary grid, that allows users to set how many columns tags take.

This is a "port" of the code we've been using in Evo, so it may not be a perfect 1:1 match with the styling/logic expected by SRU, which naturally can be tweaked to fit

@gfrn gfrn self-assigned this Nov 17, 2026
@gfrn
gfrn requested a review from a team November 17, 2026 12:07
@gfrn gfrn added priority/p3-low Nice to have, could do Component javascript Pull requests that update javascript code Storybook labels Nov 17, 2026
@zoharma

zoharma commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

This is a visual review, not a code one. I think someone else should review it code-wise.

Overall, I think this ia great addition, and thank you for that! I have a couple of suggestions, both regarding accessibility, but one can be fixed in this branch, and another should be considered, but not sure if in this PR.

(These examples were made in the browser style editor)

  1. Icon size: I think 12px is too small and I'd like our minimum to be 16px (14px stretching it). Please consider this.
image
  1. Colour state. Part of the accessibilioty guidelines is that we should "avoid relying on colour alone", and that we should "combine colour with labels, icons, text or layout changes where appropriate". In this instance, I think that adding more colour surfaces helps, and the chip pushes it even more.
    At the moment, treat this as a suggestion, but we may update the component to be more explicit later.
image

@zoharma

zoharma commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Also, please add a changelog.md "Added" line.

@gfrn

gfrn commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator Author
image

Applied the changes, the only thing is that I made the status chip smaller, since otherwise, there would be no padding around the edges, but otherwise, I'm happy to apply both suggestions, as they are definitely an improvement

@zoharma

zoharma commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Thank you @gfrn! This looks great, thank you for actioning that. Just make sure the chip text size is around 12px (0.75rem), I'm worried otherwise its too small. For the sizes, I have a plan post #383 to go through Chips and others and introduce additional sizes.

@gfrn

gfrn commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

I've bumped it up to 0.75rem (for the font size) and the height is still 16px, so should be slightly easier to read now

image

@zoharma zoharma added this to the 0.9.0 milestone Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component javascript Pull requests that update javascript code priority/p3-low Nice to have, could do Storybook

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants