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

Match scales between actions and their icons #10560

Open
1 of 5 tasks
nwhittaker opened this issue Oct 18, 2024 · 0 comments
Open
1 of 5 tasks

Match scales between actions and their icons #10560

nwhittaker opened this issue Oct 18, 2024 · 0 comments
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.

Comments

@nwhittaker
Copy link
Contributor

Description

Screenshot 2024-10-18 at 1 49 33 PM

The scale of the icon within an action can become mismatched from the action's scale. At m and l scales, this causes the icon to become disproportionately sized relative to the amount of padding the action places around it.

Screenshot 2024-10-18 at 2 15 20 PM

The extra white-space becomes more noticeable when the action is slotted in a list or panel action-bar. It is also noticeable when compared with a button which has a snugger padding scale.

One option is to not downscale icons within actions. However, this could cause action icons to appear larger than non-action icons within the component.

Another option is to match the same padding scale as buttons, but I can understand there being accessibility concerns with ensuring the s scale is a big enough target. Barring that, I'd suggest revisiting the action padding and maybe have it match the scale of its icon. In other words, the action s scale styles remains unchanged, its m scale has larger text but the same padding as its s scale, and its l scale takes on the same padding as the original m scale.

Proposed Advantages

When composing a layout with Calcite components, I routinely find myself scaling actions one step below the host component's scale to ensure their white-space is consistent with how other component's scale themselves. Refactoring actions' scaling to be more consistent with other components' would make them more plug-and-play and consistently sized across apps.

Which Component

Action

Relevant Info

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components
@nwhittaker nwhittaker added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked. labels Oct 18, 2024
@github-actions github-actions bot added the calcite-components Issues specific to the @esri/calcite-components package. label Oct 18, 2024
@macandcheese macandcheese added the design Issues that need design consultation prior to development. label Feb 25, 2025
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. calcite-components Issues specific to the @esri/calcite-components package. design Issues that need design consultation prior to development. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

2 participants