fix(projects): rendre visible le bouton + d'ajout d'onglet projet (#46)

Le bouton + de la barre d'onglets projets était invisible (pas de variant
d'affichage). Il est désormais rendu en permanence via un variant secondary,
avec aria-pressed et title pour l'accessibilité, permettant d'ajouter un
projet en onglet.

Couvert par un nouveau test (ProjectTabs.test.tsx).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 12:42:31 +02:00
parent 0e594adaf3
commit b152e33b60
2 changed files with 87 additions and 2 deletions

View File

@ -52,12 +52,21 @@ export function ProjectTabs({
className="flex-1"
/>
)}
{/* Add-project affordance (#46): always a bordered `secondary` button so
it reads as a clickable control in every state — including zero open
projects — instead of the near-invisible `ghost` glyph it used to be.
When the Projects panel is open it also shows the pressed ring. */}
<Button
size="sm"
variant={projectsPanelOpen ? "secondary" : "ghost"}
variant="secondary"
onClick={onOpenProjectsPanel}
aria-label="open projects panel"
className="shrink-0"
aria-pressed={projectsPanelOpen}
title="Ajouter un projet"
className={cn(
"shrink-0",
projectsPanelOpen && "ring-1 ring-border-strong",
)}
>
+
</Button>