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

[Chip, Chip Group] "xs" scale variant #11208

Open
2 of 5 tasks
dmartini-zrh opened this issue Jan 6, 2025 · 5 comments
Open
2 of 5 tasks

[Chip, Chip Group] "xs" scale variant #11208

dmartini-zrh opened this issue Jan 6, 2025 · 5 comments
Labels
0 - new New issues that need assignment. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.

Comments

@dmartini-zrh
Copy link

Check existing issues

Description

The Chip (and Chip Group) component currently exists in 3 scale variants.
The smallest is scale="s" and uses --calcite-font-size--2 text (12px).

When chips are used to label low level items in the UI, such as List Item at scale="s", this variant still looks big.
In such use case, it would be nice to have a smaller scale variant e.g. using --calcite-font-size--3 text (10 px) to keep the Chip hierarchically below the item it refers to.

Acceptance Criteria

  • Allow Chips to use the smallest font size in Calcite

Relevant Info

Such small Chips could be limited to text-only use cases (no selection or closing controls, no avatars, no icons).

Which Component

Chip (also affecting Chip Group)

Example Use Case

Example:

Screenshot 2024-10-24 at 17 15 21

(Basemap gallery in Scene Viewer)

Priority impact

impact - p3 - not time sensitive

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Scene Viewer

@dmartini-zrh dmartini-zrh added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Jan 6, 2025
@github-actions github-actions bot added ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Jan 6, 2025
@geospatialem geospatialem added the design Issues that need design consultation prior to development. label Jan 6, 2025
@macandcheese
Copy link
Contributor

As a workaround you can override the font-size with tokens: https://codepen.io/mac_and_cheese/pen/ByBrpbx?editors=100

This might even be the preferred way to achieve this, vs. adding a "special" scale here cc @SkyeSeitz @ashetland @matgalla for design thoughts.

@dmartini-zrh
Copy link
Author

Thanks @macandcheese this looks neat 👍
We did something similar, but IMO it's still good to wrap up our thoughts

@ashetland
Copy link
Contributor

ashetland commented Jan 13, 2025

I think the primary concern with adding an xs scale to Chip is that the Calcite UI Icons would be too large. @macandcheese @SkyeSeitz, do we have concerns about scaling icons down to 12px for this? I think the only place we force a scale on icons is in Tile, right? Another option is adding a 12px size to all the icons, but that's not a small ask 😅.

@macandcheese
Copy link
Contributor

Yeah, I don't think we'd want to really handle icons that way - should be more systemic in nature and maybe in tandem with some other types of scaling changes. In this case, just seems like a font-size adjustment to the "closest workable scale" might be the best approach?

@SkyeSeitz
Copy link

Agreed overriding the font-size with tokens would be the best approach since it would problematic to provide an xs scale that cannot fit our icons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Scene Viewer Issues logged by ArcGIS Scene Viewer team members calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. enhancement Issues tied to a new feature or request. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

5 participants