fix(desktop): keep the create button in the nav rail - #97076
rubychilds wants to merge 3 commits into
Conversation
The sidebar holds every create affordance: the floating "+" and the "New task" row. Collapsing the sidebar, or landing on a destination that draws no sidebar, leaves the keyboard shortcut as the only way to start a task. Show a "New task" button in the title bar beside the sidebar toggle whenever the sidebar body is off screen. It files into the scoped channel, the same as the shortcut and the sidebar "+". Generated-By: PostHog Desktop Task-Id: ae645e0e-1651-4060-b869-5e751f874793
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
🤖 CI report✅ Trunk lane — non-backend lane (
|
| File | Comment lines | Added lines |
|---|---|---|
products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx |
21 | 80 |
products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx |
5 | 24 |
products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx |
5 | 12 |
products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx |
2 | 15 |
products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx |
2 | 48 |
This check does not block merging. It updates on every push and clears when the share drops.
HostHog preview —
|
The orange create button lived only in the sidebar, so collapsing the sidebar took away the last mouse route to a new task. It now sits in the nav rail above Search on every destination, the floating copies in the space pane and the spaces list are gone, and the Spaces heading gets a "+" for a new space. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57a331e665
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <ChannelsFab | ||
| channelId={currentChannelId ?? undefined} | ||
| placement="rail" |
There was a problem hiding this comment.
Keep New space available while filtering Spaces
When the Spaces search query is nonempty and a channel is scoped, this prop makes the rail FAB direct-only because ChannelsFab treats a channelId as "New task", while NewSpaceButton is only rendered in the unfiltered normalizedQuery ? ... : ... branch of ChannelsList.tsx. The previous list FAB had no channelId and retained its New space menu, so users now have to clear their search before they can create a space. Keep a New space action in the filtered state or expose it from the rail menu.
Useful? React with 👍 / 👎.
| // Off the layout, bottom padding clears the floating create button | ||
| // (ChannelsFab) so the last channel stays reachable at full scroll. The | ||
| // layout keeps that button in the rail, so the list needs no room for it. | ||
| const scrollClass = `scroll-mask-8 min-h-0 flex-1 overflow-y-auto px-2 pt-2 ${channelsLayout ? "pb-2" : "pb-16"}`; |
There was a problem hiding this comment.
Remove the forced bottom spacer from Spaces
On the Spaces layout, scrollClass now supplies pb-2, but the same list still has the existing !pb-16 class. The important Tailwind utility wins, leaving the former floating-button clearance (4rem) as dead space at the bottom of the list even though the FAB was moved to the rail. Make the important padding conditional or remove it for the Spaces layout.
Useful? React with 👍 / 👎.
Problem
Changes
See Loom
The orange create button now lives in the nav rail, above Search, on every destination. It still files a task into the space you are in.
The floating copies over the space pane and the spaces list are gone, so there is one create button.
The Spaces heading gains a "+" for a new space, shown on hover like a row's own controls.
Off the spaces layout nothing changes: that sidebar has no rail and keeps its floating button.
How did you test this code?
🤖 Agent context
Created with PostHog from a Slack thread