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 horizontal overflow in stats tooltip #3817

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrgnr
Copy link
Contributor

@mrgnr mrgnr commented Sep 27, 2022

Pull Request Form

The numbers corresponding to "Hours Recorded" and "Hours Validated" were positioned horizontally within the tooltip, causing the text to overflow outside of the tooltip bubble. We now use the default display styling for the containing <div>, which lays the metrics out vertically to avoid overflow.

Type of Pull Request

  • Bulk sentence upload
  • Related to a listed issue
  • Other

Screenshots

common-voice-fix-tooltip-overflow

The numbers corresponding to "Hours Recorded" and "Hours Validated" were
positioned horizontally within the tooltip, causing the text to overflow
outside of the tooltip bubble. We now use the default `display` styling
for the containing <div>, which lays the statistics out vertically to
avoid overflow.
@mrgnr mrgnr requested a review from a team as a code owner September 27, 2022 10:35
@mrgnr mrgnr requested review from mozgzh and removed request for a team September 27, 2022 10:35
@mozgzh
Copy link
Contributor

mozgzh commented Oct 11, 2022

Thanks for the PR! There's another PR #3771 that's related to this issue. I think the easiest solution is to ensure the tooltip container (with the white background) isn't restricted by width. If you want to give it a try, removing line 273 in index.css would fix the issue by allowing the parent div to wrap around the datapoints/date instead of forcing them to break.

max-width: 140px;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants