Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.2k
Implement floating contributor profile menu#25468
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?
Implement floating contributor profile menu#25468
Conversation
coderabbitaibot commentedNov 18, 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.
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates thehigh-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for usingCodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3bfe554 to87f5dcfCompareE2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d)&& gh run download 19530669702 -n playwright-report -D"$REPORT_DIR"&& npx playwright show-report"$REPORT_DIR" |
ff2e3cd toe7110d1CompareE2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d)&& gh run download 19639860268 -n playwright-report -D"$REPORT_DIR"&& npx playwright show-report"$REPORT_DIR" |
jonatansberg left a comment
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.
@peterzimon this looks better! I wonder if we can't take the composition one step further tho.
| <UserMenuItem> | ||
| <Link to={`/settings/staff/${currentUser.data?.slug}`}> | ||
| <LucideIcon.User /> | ||
| <UserMenuItem.Label>Your profile</UserMenuItem.Label> | ||
| </Link> | ||
| </UserMenuItem> | ||
| <UserMenuItem | ||
| asChild={false} | ||
| className="cursor-pointer text-base" | ||
| onSelect={(e: Event) => { | ||
| e.preventDefault(); | ||
| setNightShift(!preferences?.nightShift); | ||
| }} | ||
| > | ||
| <LucideIcon.Moon /> | ||
| <UserMenuItem.Label>Dark mode</UserMenuItem.Label> | ||
| <Switch | ||
| size='sm' | ||
| checked={preferences?.nightShift ?? false} | ||
| disabled={isEditingPreferences} | ||
| onCheckedChange={setNightShift} | ||
| onClick={(e: React.MouseEvent<HTMLElement>) => e.stopPropagation()} | ||
| tabIndex={-1} | ||
| /> | ||
| </UserMenuItem> | ||
| <DropdownMenuSeparator /> | ||
| <UserMenuItem | ||
| asChild={false} | ||
| className="cursor-pointer text-base" onClick={() => { | ||
| fetch("/ghost/api/admin/session", { | ||
| method: "DELETE", | ||
| }).then(() => { | ||
| window.location.href = "/ghost"; | ||
| }).catch((error) => { | ||
| console.error(error); | ||
| }); | ||
| }} | ||
| > | ||
| <LucideIcon.LogOut /> | ||
| <UserMenuItem.Label>Sign out</UserMenuItem.Label> | ||
| </UserMenuItem> |
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.
Aren't these menu items are also repeated between the different user menus?
Co-authored-by: jonatan <jonatan@ghost.org>
Co-authored-by: jonatan <jonatan@ghost.org>
8dcdaac to67ba53cCompare
Got some code for us? Awesome 🎊!
Please take a minute to explain the change you're making:
This change implements a floating user profile menu for contributor accounts in the new React admin, replacing the full sidebar. This aligns with the existing Ember behavior for contributors and is a key step in the "Admin: Ember to React" migration (BER-2993).
It introduces a new
ContributorProfileMenucomponent, providing a minimal set of actions (Posts, View site, Your profile, Dark mode, Sign out). TheAdminLayoutis updated to conditionally render this floating menu for contributors, while retaining the full sidebar for other user roles. A minor type fix inUserMenu.tsxis also included.For Contributors: This provides a streamlined, role-appropriate user interface, consistent with the previous Ember admin, reducing visual clutter and focusing on their primary tasks.
For Developers: It advances the React migration effort, converting another core UI element and establishing patterns for role-based component variations within the Shade design system.
Please check your PR against these items:
We appreciate your contribution! 🙏
Linear Issue:BER-2993