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

Same instances of calcite slider appear to have different rendered size #8049

Open
2 of 5 tasks
minhiu opened this issue Oct 24, 2023 · 3 comments
Open
2 of 5 tasks
Labels
0 - new New issues that need assignment. ArcGIS Business/Community Analyst Issues logged by ArcGIS Business/Community Analyst team members. blocked This issue is blocked by another issue. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive
Milestone

Comments

@minhiu
Copy link

minhiu commented Oct 24, 2023

Check existing issues

Actual Behavior

I have multiple same instances of Calcite Slider element, however, they appear to be different in block-size:
Screen Shot 2023-10-24 at 12 46 15 PM

As we can see, the two sliders highlighted in red boxes appear to be slightly smaller, even though all sliders are the same instances of Calcite Slider.

Expected Behavior

All sliders should appear to have the same size

Reproduction Sample

https://codepen.io/Hieu-Pham-the-animator/pen/Jjxdjma?editors=1000

Reproduction Steps

Changing the browser's zoom level will also change the rendered size of the sliders randomly.

Reproduction Version

1.9.2

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Calcite package

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

Esri team

ArcGIS Business/Community Analyst

@minhiu minhiu added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Oct 24, 2023
@github-actions github-actions bot added ArcGIS Business/Community Analyst Issues logged by ArcGIS Business/Community Analyst 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 Oct 24, 2023
@jcfranco
Copy link
Member

Thanks for reporting this.

I believe this is expected since we're using rems to size the slider track (as well as other parts). Due to how rems are calculated, it is expected that some calculated values might be fractional and depending on user's hardware, this might cause some differences in rendering (FWIW, this isn't observable in Retina displays).

@geospatialem geospatialem added blocked This issue is blocked by another issue. and removed needs triage Planning workflow - pending design/dev review. labels Nov 27, 2023
@geospatialem geospatialem added this to the Stalled milestone Nov 27, 2023
@geospatialem
Copy link
Member

Will revisit once the token effort is completed in #7180, targeted for next month (December).

@jcfranco
Copy link
Member

Adding to @geospatialem's comment, component tokens will use pixels (vs rems as the slider currently does), so multiple component instances would render consistently. cc @alisonailea

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 Business/Community Analyst Issues logged by ArcGIS Business/Community Analyst team members. blocked This issue is blocked by another issue. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive
Projects
None yet
Development

No branches or pull requests

3 participants