Repository navigation
Account menu on a guild's public pages - #308
Merged
Merged
Conversation
The hub, handle, custom domain, form and status pages only had a sign-out button once someone was signed in, so there was no way from there into the dashboard. They now get the same account menu as the site header: dashboard, my submissions, sign out and the appearance switch, in the guild's colour. On a phone the button shows only the avatar so the guild name keeps its room. The menu moves out of header-bar.tsx into account-menu.tsx so both headers share it, and account.ts holds the copy and the dashboard links. From a custom domain the links lead to the primary host, where the dashboard lives. Signed out, the public pages keep the direct one-click Discord login.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Signed in on a guild's public pages (hub at
/g/<id>, a handle like/msk-forms, a custom domain, forms and status pages), you only got a sign-out button. There was no way from there into the dashboard.Those pages now show the same account menu as the site header: Dashboard, My submissions, Log out and the appearance switch. It takes the guild's colour like the rest of the frame. On a phone the button shows only the avatar, so the guild name keeps its room.
How
AccountMenuandAccountSectionsmove fromheader-bar.tsxintocomponents/site/account-menu.tsx, so the site header andPublicFrameshare them. The panel id now comes fromuseId.components/site/account.tsholds the copy and the dashboard links. From a custom domain the links point toAPP_URL, since the dashboard only lives on the primary host. Same ruleSiteHeaderalready had.Checked
apps/web: typecheck, lint, 347 tests green./g/<id>at 1440 px light and dark and at 375 px: menu opens, both links right, Escape closes and returns focus, no console errors, panel stays inside the viewport.Hostheader both links lead toAPP_URL.Note: on a custom domain the session cookie belongs to that domain, so the dashboard on the primary host may ask for a sign-in once. That follows from #146 (no cross-domain session handoff).