-
Notifications
You must be signed in to change notification settings - Fork 609
doc(frontend): Unify sidebar project/org selector proposal #5730
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Sidebar selector consolidation | ||
|
|
||
| The sidebar carries two stacked selectors — one for organization, one for project — and each | ||
| hides a submenu of management actions. This proposal merges them into a single dropdown and | ||
| narrows that dropdown to viewing, switching, and creating. Every other action moves to Settings, | ||
| where most of them already live. | ||
|
|
||
| No capability leaves the platform. | ||
|
|
||
| ## What the sidebar does today | ||
|
|
||
| ### Organization selector | ||
|
|
||
| | Capability | Behavior | | ||
| |---|---| | ||
| | View organizations | Shows the active org on the button and lists the rest in the dropdown | | ||
| | Switch organization | Checks access, then switches | | ||
| | Create organization | Opens a name modal | | ||
| | Rename organization | Submenu action on the selected org, owner only | | ||
| | Transfer ownership | Submenu action, owner only; picks a new owner from workspace members | | ||
| | Delete organization | Submenu action, owner only; confirms by typed name | | ||
| | Demo badge | Tags orgs flagged `is_demo` | | ||
| | Auth upgrade prompt | Opens on `AUTH_UPGRADE_REQUIRED` or `AUTH_SSO_DENIED` | | ||
| | Domain denied error | Shows a toast on `AUTH_DOMAIN_DENIED` | | ||
| | Logout | Confirms, then ends the session | | ||
|
|
||
| ### Project selector | ||
|
|
||
| | Capability | Behavior | | ||
| |---|---| | ||
| | View projects | Shows the active project on the button and lists the rest in the dropdown | | ||
| | Switch project | Navigates, keeping the current route | | ||
| | Create project | Pinned footer action, opens a name modal | | ||
| | Rename project | Submenu action on the active project | | ||
| | Copy project ID | Copies the ID to the clipboard | | ||
| | Set as default | Marks the active project as the org default | | ||
| | Delete project | Submenu action; blocked on the default and the last project | | ||
| | Default badge | Tags the org's default project | | ||
|
|
||
| ### Bottom section | ||
|
|
||
| | Capability | Behavior | | ||
| |---|---| | ||
| | Settings | Links to project settings | | ||
| | Invite teammate | Deep-links to Settings, Members, with the invite modal open | | ||
| | Live chat support | Toggles the Crisp widget; cloud only | | ||
| | Help & Docs | Submenu: documentation, GitHub, Slack, book a call | | ||
| | Announcement banner | Shows the top-priority banner; dismissible; hidden when collapsed | | ||
|
|
||
| ## What the sidebar does under this proposal | ||
|
|
||
| One dropdown replaces two. The organization sits at the top, projects below it, and a | ||
| second-level list handles organization switching. | ||
|
|
||
| | Capability | Behavior | | ||
| |---|---| | ||
| | View organizations | Shows the active org on the button and lists the rest under Switch organization | | ||
| | View projects | Shows the active project on the button and lists the rest in the dropdown | | ||
| | Switch project | Lists the active org's projects inline | | ||
| | Create project | Action below the project list | | ||
| | Switch organization | Opens a second-level list of organizations | | ||
| | Create organization | Action below that list | | ||
| | Logout | Confirms, then ends the session | | ||
|
|
||
| The bottom section keeps Settings, Help & Docs, and the announcement banner. Live chat support | ||
| joins the Help & Docs submenu. | ||
|
|
||
| ## What moves | ||
|
|
||
| | Capability | Destination | Status | | ||
| |---|---|---| | ||
| | Rename organization | Settings, Organization, General | Already available | | ||
| | Transfer ownership | Settings, Organization, General | Already available | | ||
| | Delete organization | Settings, Organization, General | Already available | | ||
| | Rename project | Settings, Organization, Projects | Already available | | ||
| | Set as default | Settings, Organization, Projects | Already available | | ||
| | Delete project | Settings, Organization, Projects | Already available | | ||
| | Default badge | Settings, Organization, Projects | Already available | | ||
| | Invite teammate | Settings, Organization, Members | Already available | | ||
| | Copy project ID | Settings, Organization, Projects | ID already shown; copy action to build | | ||
| | Copy organization ID | Settings, Organization, General | To build | | ||
| | Demo badge | Settings, Organization, General | To build | | ||
| | Live chat support | Help & Docs submenu | Relocates | | ||
|
|
||
| Eight of the twelve moved capabilities already have a home in Settings. Three need building | ||
| there. One relocates as-is. | ||
|
ashrafchowdury marked this conversation as resolved.
|
||
|
|
||
| ## Consequences | ||
|
|
||
| **Auth state leaves the sidebar without becoming a settings feature.** The access check runs on | ||
| a switch, so it stays with the switch, but the upgrade prompt and the domain-denied error move | ||
| to an app-level host driven by a Jotai atom. The sidebar sets the atom and owns nothing else. | ||
| This matches the repo's state convention, and any future entry point that switches | ||
| organizations reuses the same atom for free. | ||
|
|
||
| **Organization switching costs one more click than project switching.** Projects are the | ||
| frequent choice; organizations are the rare one. The second-level list prices each accordingly. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.