-
Notifications
You must be signed in to change notification settings - Fork 4k
Restyle the toolbar in CR and revision preview links #3631
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
Restyle the toolbar in CR and revision preview links #3631
Conversation
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
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.
Pull Request Overview
This PR completely overhauls the admin toolbar displayed on change request (CR) and revision preview links with an enhanced visual design, animations, and improved functionality. The toolbar now features an animated GitBook logo, interactive magnification effects, and better responsive behavior.
- Replaces the simple static toolbar with an animated, interactive version featuring a prominently displayed GitBook logo
- Adds comprehensive animation system using framer-motion for smooth transitions, staggered appearances, and hover effects
- Implements a sophisticated magnification effect for toolbar buttons that scales and repositions them based on mouse proximity
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
DateRelative.tsx | Wraps the time element with a Tooltip component to improve UX |
useMagnificationEffect.ts | New custom hook implementing Mac-style dock magnification for toolbar buttons |
transitions.ts | Defines animation configurations and timing for toolbar elements |
index.ts | Updates exports to include new toolbar components |
Toolbar.tsx | Complete rewrite of toolbar components with animations and interactive features |
RefreshChangeRequestButton.tsx | Updates button to use new toolbar design system with motion values |
AnimatedLogo.tsx | New component for the animated GitBook logo with SVG path animation |
AnimatedLogo.module.css | CSS animations for the logo's segmented stroke effect |
AdminToolbarClient.tsx | New client component handling toolbar rendering logic |
AdminToolbar.tsx | Simplified server component that passes data to client component |
package.json | Adds motion library dependency for animations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/gitbook/src/components/AdminToolbar/useMagnificationEffect.ts
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/useMagnificationEffect.ts
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AnimatedLogo.module.css
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AnimatedLogo.module.css
Outdated
Show resolved
Hide resolved
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.
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/AdminToolbar/AdminToolbarClient.tsx
Outdated
Show resolved
Hide resolved
6ca6239
to
dbaaf35
Compare
Details
This PR updates the styles a bit and adds some more functionality to the toolbar displayed on CR and revision preview links.
Will likely be iterated on design-wise, but that can come later. Also, it is not yet draggable, but that is also the intent for a follow-up PR.
Preview
Change-request preview link:
CleanShot.2025-09-08.at.15.25.22.mp4
Revision preview link:

Dark mode: