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

fix: Fix chart title truncating when Chrome is zoomed out #20847

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Jul 25, 2022

SUMMARY

When user zoomed out the browser (could repro only in Chrome, Safari and Firefox worked fine), titles of some charts would truncate. That's because for some reason (probably browser bug) the input container decreased it's width by 0.01px.
Also, confirmed that it's always just 0.01px, so this PR simply adds 1px to the input container as a failsafe.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image

After:
image

TESTING INSTRUCTIONS

  1. Open Explore, zoom out Chrome (with cmd -)
  2. Verify that title is not truncated (unless it should be because there's actually too little space of course)

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #20847 (9c28d15) into master (644148b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #20847   +/-   ##
=======================================
  Coverage   66.33%   66.33%           
=======================================
  Files        1756     1756           
  Lines       66769    66769           
  Branches     7059     7059           
=======================================
  Hits        44288    44288           
  Misses      20684    20684           
  Partials     1797     1797           
Flag Coverage Δ
javascript 51.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tend/src/components/DynamicEditableTitle/index.tsx 74.07% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@kgabryje kgabryje merged commit 46deb79 into apache:master Jul 26, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants