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

v4: Add defaultOpen option for sidebar visibility control #4042

Merged
merged 14 commits into from
Jan 28, 2025

Conversation

hichemfantar
Copy link
Contributor

@hichemfantar hichemfantar commented Jan 25, 2025

Introduce a defaultOpen option to manage the initial visibility of the sidebar, allowing users to customize their experience.

closes #4032

Check off the following:

  • I have reviewed my changes in staging, available via the View
    deployment
    link in this PR's timeline (this link will be available after
    opening the PR).

Copy link

changeset-bot bot commented Jan 25, 2025

🦋 Changeset detected

Latest commit: 4b93476

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

This PR includes changesets to release 3 packages
Name Type
nextra-theme-docs Patch
nextra Patch
nextra-theme-blog 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

Copy link

vercel bot commented Jan 25, 2025

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

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 0:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 0:12am

Copy link

vercel bot commented Jan 25, 2025

@hichemfantar is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@hichemfantar
Copy link
Contributor Author

hichemfantar commented Jan 25, 2025

There's weird behavior where if the default is false, then you open the sidebar, the elemnts don't take the full width

could be existing animation code race condition

image

@hichemfantar hichemfantar changed the title Add defaultOpen option for sidebar visibility control v4: Add defaultOpen option for sidebar visibility control Jan 25, 2025
Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

please fix #4042 (comment) issue first

@hichemfantar
Copy link
Contributor Author

looks like it's fixed

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

new changes produce word wrapping (decrease video speed to see it)

Screen.Recording.2025-01-26.at.05.18.18.mov

@hichemfantar
Copy link
Contributor Author

Doesn't seem like a big issue to me

this pr also fixes an issue with elements overflowing

example

image

@hichemfantar
Copy link
Contributor Author

wrapping issue fixed

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

Screen.Recording.2025-01-26.at.15.32.59.mov

see done becomes done w

@dimaMachina dimaMachina merged commit 57e98cd into shuding:main Jan 28, 2025
5 of 9 checks passed
@hichemfantar
Copy link
Contributor Author

hichemfantar commented Jan 28, 2025

@dimaMachina the overflow bug still exists which my implementation fixed

close the sidebar and open to reproduce

image

@dimaMachina
Copy link
Collaborator

@dimaMachina the overflow bug still exists which my implementation fixed

close the sidebar and open to reproduce

image

@hichemfantar how do you reproduce it?

Screen.Recording.2025-01-28.at.19.24.35.mov

@hichemfantar
Copy link
Contributor Author

#4084

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.

how to collapse the sidebar by default?
2 participants