desktop: test layout — single workspace box for project detail

Restructure the project detail view so the repository / source / branch
selection row sits at the top of one panel box, with the tab strip and
the active panel inside it. The readme header rows move up: source
controls into the selection row, the last-changed timestamp into the
tab strip. The files panel drops its duplicated source controls and
keeps only its path breadcrumb. All selection dropdowns (repository,
source, branch) now share one trigger style.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
Thomas Petersen
2026-08-11 07:03:57 -04:00
parent 764d6183a1
commit 20fce153ae
9 changed files with 349 additions and 269 deletions

View File

@@ -26,7 +26,10 @@ import {
DropdownMenuTrigger,
} from "@/shared/ui/dropdown-menu";
import { GitHubMark } from "./GitHubMark";
import { PROJECT_PANEL_ACTION_BUTTON_CLASS } from "./projectPanelStyles";
import {
PROJECT_PANEL_ACTION_BUTTON_CLASS,
PROJECT_PICKER_TRIGGER_CLASS,
} from "./projectPanelStyles";
/** Branch picker shared by the readme and files panel headers. */
export function RepositoryBranchDropdown({
@@ -34,7 +37,6 @@ export function RepositoryBranchDropdown({
branchOptions,
selectedTag,
tagOptions = [],
compact,
createBranchDisabled,
createBranchTitle,
deleteBranchDisabled,
@@ -48,8 +50,6 @@ export function RepositoryBranchDropdown({
branchOptions: string[];
selectedTag?: string | null;
tagOptions?: Array<{ name: string; commit: string }>;
/** Smaller trigger for inline headers. */
compact?: boolean;
createBranchDisabled?: boolean;
createBranchTitle?: string;
deleteBranchDisabled?: boolean;
@@ -74,17 +74,13 @@ export function RepositoryBranchDropdown({
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
className={
compact
? "h-7 max-w-full gap-1.5 rounded-md px-3 font-mono text-sm font-medium hover:border-input"
: "h-6 max-w-full gap-1.5 px-2 font-mono text-sm font-semibold hover:border-input"
}
className={PROJECT_PICKER_TRIGGER_CLASS}
size="sm"
type="button"
variant="outline"
>
<RefIcon className="h-4 w-4 shrink-0 text-muted-foreground" />
<span className="truncate">{selectedTag ?? branch}</span>
<span className="truncate font-mono">{selectedTag ?? branch}</span>
<ChevronDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
</Button>
</DropdownMenuTrigger>
@@ -229,7 +225,7 @@ export function RepoSourceDropdown({
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
className="h-7 max-w-full shrink-0 gap-1.5 rounded-md px-3 text-sm font-medium hover:border-input"
className={PROJECT_PICKER_TRIGGER_CLASS}
size="sm"
type="button"
variant="outline"