Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
jonatansberg wants to merge9 commits intomain
base:main
Choose a base branch
Loading
fromcursor/BER-2993-implement-floating-contributor-profile-menu-e274

Conversation

@jonatansberg
Copy link
Member

Got some code for us? Awesome 🎊!

Please take a minute to explain the change you're making:

  • Why are you making it?
    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).
  • What does it do?
    It introduces a newContributorProfileMenu component, providing a minimal set of actions (Posts, View site, Your profile, Dark mode, Sign out). TheAdminLayout is updated to conditionally render this floating menu for contributors, while retaining the full sidebar for other user roles. A minor type fix inUserMenu.tsx is also included.
  • Why is this something Ghost users or developers need?
    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:

  • I've read and followed theContributor Guide
  • I've explained my change
  • I've written an automated test to prove my change works

We appreciate your contribution! 🙏


Linear Issue:BER-2993

Open in Cursor Open in Web

@coderabbitai
Copy link
Contributor

coderabbitaibot commentedNov 18, 2025
edited
Loading

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the.coderabbit.yaml file in this repository. To trigger a single review, invoke the@coderabbitai review command.

You can disable this status message by setting thereviews.review_status tofalse in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchcursor/BER-2993-implement-floating-contributor-profile-menu-e274

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.

  • Provide your own instructions using thehigh_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Usehigh_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

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.

❤️ Share

Comment@coderabbitai help to get the list of available commands and usage tips.

@peterzimonpeterzimonforce-pushed thecursor/BER-2993-implement-floating-contributor-profile-menu-e274 branch from3bfe554 to87f5dcfCompareNovember 20, 2025 08:37
@github-actions
Copy link
Contributor

E2E Tests Failed

To 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"

@peterzimonpeterzimonforce-pushed thecursor/BER-2993-implement-floating-contributor-profile-menu-e274 branch fromff2e3cd toe7110d1CompareNovember 24, 2025 14:23
@github-actions
Copy link
Contributor

E2E Tests Failed

To 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"

Copy link
MemberAuthor

@jonatansbergjonatansberg left a 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.

Comment on lines 82 to 122
<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>
Copy link
MemberAuthor

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?

@peterzimonpeterzimonforce-pushed thecursor/BER-2993-implement-floating-contributor-profile-menu-e274 branch from8dcdaac to67ba53cCompareNovember 28, 2025 08:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@jonatansberg@cursoragent@peterzimon

[8]ページ先頭

©2009-2025 Movatter.jp