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

✨ (grapher) prevent controls from overflowing #3642

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented May 23, 2024

Keeps controls from overflowing on smaller screens. See screenshots πŸ‘‡πŸ»

The "Show selection only" toggle on the table tab is moved into the settings drawer. The rest are just CSS touchups.

We compute the widths of the content switchers and the toggle to determine if there is enough space for the table toggle. I could have implemented this in a simpler way using breakpoints, but I wanted to make sure that we only hide the table toggle if absolutely necessary.

Before After
Screenshot 2024-05-23 at 18 36 23 Screenshot 2024-05-23 at 18 36 02
Screenshot 2024-05-23 at 18 35 18 Screenshot 2024-05-23 at 18 35 02
Screenshot 2024-05-23 at 18 35 27 Screenshot 2024-05-23 at 18 35 51

Copy link
Member Author

sophiamersmann commented May 23, 2024

@owidbot
Copy link
Contributor

owidbot commented May 23, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-grapher-controls

SVG tester:

Number of differences (default views): 1 (3c9272) ❌
Number of differences (all views): 6 (99535c) ❌

Edited: 2024-06-10 12:14:38 UTC
Execution time: 1.27 seconds

@sophiamersmann sophiamersmann force-pushed the grapher-controls branch 4 times, most recently from 615d241 to 1478852 Compare May 27, 2024 09:58
Copy link

@sophiamersmann sophiamersmann changed the title ✨ (grapher) prevent controls from overlapping ✨ (grapher) prevent controls from overflowing May 27, 2024
@sophiamersmann sophiamersmann marked this pull request as ready for review May 27, 2024 11:41
@sophiamersmann sophiamersmann requested a review from danyx23 May 27, 2024 11:41
Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! :shipit:

@sophiamersmann sophiamersmann merged commit 572c04a into master Jun 10, 2024
20 of 22 checks passed
@sophiamersmann sophiamersmann deleted the grapher-controls branch June 10, 2024 12:52
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.

3 participants