mirror of
https://github.com/block/buzz.git
synced 2026-12-01 13:42:45 +00:00
feat(desktop): make the Projects overview follow the selected section (#6335)
## Summary Part 1 of 4 stacked PRs continuing the Projects work from #6003. - The Projects overview now follows the selected section: the right-hand context pod stays visible across the Projects / Repositories / Reviews / Tasks / Channels tabs and shows section-specific people, stats, and contribution graphs, so it reads as live context rather than a detached summary. - Entity list rows are consolidated onto one compact line (title first, icons after, aligned dates/counts), shared across projects, repositories, PRs, issues, and channel lists via `ProjectEntityListRow`. - New `projectRelatedChannels` helper resolves the channels a project is discussed in for the overview. Follow-ups in this stack: part 2 (selectable workspaces), part 3 (context-aware collaboration), part 4 (navigation & detail-page polish). ## Test plan - [x] Desktop unit tests (`pnpm test`) — pass - [x] TypeScript (`tsc --noEmit`), Biome, clippy — clean via pre-push gate - [x] Playwright specs updated for the new overview behavior (`projects-v3-screenshots.spec.ts`, `sidebar.spec.ts`) — pass locally in the smoke project --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -11,10 +11,12 @@ const MENU_ITEM_CLASS =
|
||||
"flex min-h-9 w-full items-center gap-2 rounded-lg py-2 pl-2 pr-4 text-left text-sm outline-hidden transition-colors hover:bg-muted/50 focus:bg-muted/50 focus:text-foreground focus-visible:ring-1 focus-visible:ring-ring [&_svg]:size-4 [&_svg]:shrink-0";
|
||||
|
||||
export function ProjectsCreateMenu({
|
||||
compact = false,
|
||||
onCreateIssue,
|
||||
onCreateProject,
|
||||
onCreatePullRequest,
|
||||
}: {
|
||||
compact?: boolean;
|
||||
onCreateIssue: () => void;
|
||||
onCreateProject: () => void;
|
||||
onCreatePullRequest: () => void;
|
||||
@@ -70,12 +72,16 @@ export function ProjectsCreateMenu({
|
||||
aria-expanded={open}
|
||||
aria-haspopup="menu"
|
||||
aria-label="Create"
|
||||
className="h-8 w-8 rounded-full"
|
||||
className={
|
||||
compact
|
||||
? "h-6 w-6 shrink-0 rounded-md text-muted-foreground hover:bg-muted/70 hover:text-foreground"
|
||||
: "h-8 w-8 rounded-full"
|
||||
}
|
||||
data-testid="projects-create-menu"
|
||||
onClick={() => setOpen(true)}
|
||||
size="icon"
|
||||
type="button"
|
||||
variant="default"
|
||||
variant={compact ? "ghost" : "default"}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user