question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

💡 Proposal - Tag vs Pill

See original GitHub issue

Tag and Pill migration in v4

The problem

Hey everyone!

Currently, we have 2 components that might be confusing. <Tag /> which is mostly used for labeling of highlighting elements in the interface

Example: Screenshot 2021-02-18 at 15 01 33

<Pill /> which is used for tagging elements in the interface

Example: Screenshot 2021-02-18 at 15 01 38

I think in order to achieve more consistency in naming we could migrate those 2 components in v4 to align their names with their purpose

The proposed solution

  1. Migrate <Tag /> to <Label />:
  • create a separate package for <Label /> that will contain current <Tag />
  • I would like to introduce a set of “filled” Labels. Currently, we have only filled-primary and I wish we have a full set, the same as we have with the default (light) state. Downside - they look a bit like Buttons to me 😕 Fixing my own bug: I’ve got to the conclusion, that it would be better to create solid boolean property for the component, instead of for example tagType="primary-filled" it would be something like:
<Label labelType="primary" size="small" solid>new</Label>

This is how it potentially would look like (more or less): Screenshot 2021-02-17 at 15 19 34

  1. Migrate <Pill /> to <Tag />, with the existing functionalities of Pill. Maybe we would like to extend the color set of Pill? is there a usecase for having more colors for this component?

Breaking changes

v4

Open questions:

  • do we agree to the proposed naming or maybe we would like to migrate <Tag /> to something like Badge?
  • do we want to create solid labels (current Tags) and do we have any objections against the solid boolean prop?
  • do we want to extend the colors set for <Pill /> (future Tag) component - more details #585?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
gui-santoscommented, Feb 18, 2021

I think I missed the discussion about the reason behind having two similar components, could you show me?

IMO, Label is a confusing name because for me Label is a component related to the <label> tag used in forms so I suggest using other name: Tag or Badge

The boolean prop idea is great 🙌

2reactions
artibellacommented, Mar 5, 2021

I am also +1 for renaming both. But I could see some issues if we repurpose the existing Pill to become the Tag component (event though it is a better name for it).

I did some quick research to see how other design systems name our current Pill component: https://material.io/components/chips#usage https://atlassian.design/components/tag/examples https://www.carbondesignsystem.com/components/tag/usage https://www.lightningdesignsystem.com/components/pills/

What is unique to our current Pill is that we also have a draggable state. Haven’t seen that in any other Design System. Another reason to rename Pill to Tag is in which context we use it most of the times which is displaying tag-like entities - at least for the usages that I am aware of.

Naming is hard 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between Pills, Chips and Tags/Tokens?
The short answer: they have different shapes. The (only slightly) longer answer: The tags in your question are not the UI device shown...
Read more >
Badges vs. Pills vs. Chips vs. Tags · Issue #266 · openui/open-ui
The Badges research contains badge components and a "pills" section (as well as "icon"). There is also a PR open to add Pills...
Read more >
22 Best UX Tools & Software to Perfect the User Experience
Here are the 22 most useful UX tools that designers can use to improve the user experience.
Read more >
The Retailer's Guide to POS Hardware (2022) - Shopify
Researching what point-of-sale (POS) hardware you need to run your retail store? Read this guide for a complete roundup of what you need...
Read more >
Design: Differentiate trigger jobs from regular jobs in the pipeline ...
Add a Trigger job badge to the trigger job pill. It should match the styling of the labels we use on multi-project and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found