- Notifications
You must be signed in to change notification settings - Fork4k
Allow hiding toolbar for one session or persistent#3698
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
changeset-botbot commentedOct 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
github-actionsbot commentedOct 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
argos-cibot commentedOct 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutArgos notifications ↗︎
|
Uh oh!
There was an error while loading.Please reload this page.
ab91865
to5d409ae
Compare4b82636
toa74ae25
Comparepackages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/gitbook/src/components/AdminToolbar/HideToolbarButton.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
packages/gitbook/src/components/AdminToolbar/HideToolbarButton.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
constSTORAGE_KEY='gitbook_toolbar_closed'; | ||
try{ | ||
consthidden=!!localStorage.getItem(STORAGE_KEY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn't we use something likelocalStorage
from@gitbook/util-local-storage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Or how does it work on GBO? We let it crash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah thanks for pointing that out, we do actually have utils already in gbo that i didnt notice:https://github.com/GitbookIO/gitbook/blob/viktor/toolbar/hide-and-close/packages/gitbook/src/lib/browser/local-storage.ts#L24. I've pushed a commit where I am using those now, and those handle the scenario where the operation fails:ef53ff9
Uh oh!
There was an error while loading.Please reload this page.
This PR adds a menu to the toolbar shown on either preview/CR links or to authenticated users to:
Also the styles are updated a bit & using motion values for a much smoother magnification effect.
Still coming up: dragging (needs some more time as the variable width makes it harder)
CleanShot.2025-10-03.at.12.51.41.mp4