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

🖊️ Improve UX for small viewports #438

Merged
merged 4 commits into from
Aug 1, 2024
Merged

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jul 30, 2024

Right now, our small-screen book-theme behaviour is:

  1. Screen Shot 2024-07-30 at 18 03 07
  2. image
  3. Screen Shot 2024-07-30 at 18 04 19
  4. Screen Shot 2024-07-30 at 18 06 58
  5. image
  6. image

With this PR, it is

  1. Screen Shot 2024-07-30 at 18 05 17
  2. image
  3. Screen Shot 2024-07-30 at 18 05 55
  4. Screen Shot 2024-07-30 at 18 06 06
  5. Screen Shot 2024-07-30 at 18 08 59
  6. Screen Shot 2024-07-30 at 18 06 20

At a high level, we disable flex-wrap in the navbar, change the navbar to sticky, and prevent the logo from shrinking. Crucially, you can scroll to the right to view the overflowing UX elements

This starts to address jupyter-book/mystmd#948

Next steps will be to move the vanishing navigation bar to the primary sidebar, and probably move the logo_text too.

Copy link

changeset-bot bot commented Jul 30, 2024

🦋 Changeset detected

Latest commit: 751e468

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@myst-theme/site Patch
@myst-theme/providers Patch
@myst-theme/frontmatter Patch
@myst-theme/diagrams Patch
@myst-theme/jupyter Patch
@myst-theme/styles Patch
@myst-theme/common Patch
@myst-theme/icons Patch
@myst-theme/book Patch
@myst-theme/article Patch
myst-to-react Patch
myst-demo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@agoose77 agoose77 requested a review from rowanc1 July 30, 2024 17:23
@rowanc1
Copy link
Member

rowanc1 commented Jul 30, 2024

Nice - this looks like an improvement. Can you add a changeset?!

@rowanc1
Copy link
Member

rowanc1 commented Jul 30, 2024

Thank you for the pictures!

@agoose77
Copy link
Collaborator Author

Yes, I'll do that!

A note -- the ugly looking primary navigation is probably a user-error (too many items in the navigation) or a UX quirk that we have to accept. The only way to improve this AFAICT would be e.g. to collapse some of the menu items at intermediate sizes into a dropdown icon.

@rowanc1
Copy link
Member

rowanc1 commented Jul 31, 2024

Sorry - merge conflict - can you resolve and feel free to merge!

@agoose77 agoose77 merged commit cdddd32 into main Aug 1, 2024
2 checks passed
@agoose77 agoose77 deleted the agoose77/fix-small-viewport branch August 1, 2024 09:21
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.

2 participants