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: user header layout on narrow screens #8858

Merged
merged 10 commits into from
Nov 27, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Nov 26, 2024

This PR throws in a number of fixes to the UsersHeader's invite link and licensed users components:

  • Change the border colors from the primary purple to being a standard border color
  • Fix text / button wrapping in the invite link component. It now wraps such that the button goes onto the row below the text if it cannot fit on the same row. The text within the button will not wrap until it absolutely has to (and is on its own line).
  • Fix the wrapping behavior of the licensed users box: the bottom row ("seats used 30 days" and "view graph over time") will now wrap at the same time as the other button in the other box.
  • Fix some text sizes within the licensed users box
  • Fix the button to look more like a link in the licensed users box

Most of it is pretty standard fare, but I've taken a slightly different route when it comes to the licensed users box component.

I switched the whole component to be a "figure" instead of an article. I was trying to figure out how I could make it behave the way we wanted visually while still linking the "seats over 30 days" to the "11 /25" counter text. The examples on MDN use things such as code snippets, poems, quotes, etc, in addition to the more common image elements. And in a way, 11/25 is a figure representing the number of seats used, so I went with that for now. That said, I'd be very interested to hear some other takes on this.

Now, because the figcaption has to be the first or last element of a figure element, I had to include the "open sidebar" button inside the caption, which isn't ideal. But I can live with it, I think.

Before:
image
image
image

After:
image
image
image

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 1:49pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Nov 26, 2024 1:49pm

Copy link
Contributor

github-actions bot commented Nov 26, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the wrapper in here, because without it, it's not a bar, but two pieces of contents. It also made more sense for the usersheader component.

@thomasheartman thomasheartman merged commit 0e8365e into main Nov 27, 2024
10 of 11 checks passed
@thomasheartman thomasheartman deleted the 1-3158/fix-layout-on-narrow-screnes branch November 27, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants