refactor(web): Button consumers outside the composer stop restyling it (#13208)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Opus 5.5 authored and GitHub committed 2026-09-22 21:33:02 -07:00
1 parent f465227773
commit 71c9b69313
38 files changed
+156 -220

No files matched your search

@@ -192,24 +192,28 @@ export default function ProjectScriptsControl({
<MenuShortcut className="ms-0">{shortcutLabel}</MenuShortcut>
</span>
))}
<Button
type="button"
variant="ghost"
size="icon-xs"
className={`absolute right-0 top-1/2 size-6 -translate-y-1/2 ${presentation === "menu" ? "" : "opacity-0 pointer-events-none transition-opacity group-hover:opacity-100 group-hover:pointer-events-auto group-focus-visible:opacity-100 group-focus-visible:pointer-events-auto"}`}
aria-label={`Edit ${script.name}`}
onPointerDown={(event) => {
event.preventDefault();
event.stopPropagation();
}}
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
openEditDialog(script);
}}
<span
className={`absolute right-0 top-1/2 flex -translate-y-1/2 ${presentation === "menu" ? "" : "opacity-0 pointer-events-none transition-opacity group-hover:opacity-100 group-hover:pointer-events-auto group-focus-visible:opacity-100 group-focus-visible:pointer-events-auto"}`}
>
<SettingsIcon className="size-3.5" />
</Button>
<Button
type="button"
variant="ghost"
size="icon-xs"
className="size-6"
aria-label={`Edit ${script.name}`}
onPointerDown={(event) => {
event.preventDefault();
event.stopPropagation();
}}
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
openEditDialog(script);
}}
>
<SettingsIcon className="size-3.5" />
</Button>
</span>
</span>
</MenuItem>
);
@@ -269,7 +273,7 @@ export default function ProjectScriptsControl({
<Button
size="xs"
variant="outline"
className="w-7 px-0 sm:w-6 @3xl/header-actions:w-auto! @3xl/header-actions:px-[calc(--spacing(2)-1px)]"
className="w-7 sm:w-6 @3xl/header-actions:w-auto!"
aria-label={`Run ${primaryScript.name}`}
// The tooltip wrapper replaces data-slot="button", so themed
// toolbar styling needs its own hook.
@@ -329,7 +333,7 @@ export default function ProjectScriptsControl({
<Button
size="xs"
variant="outline"
className="w-7 px-0 sm:w-6 @3xl/header-actions:w-auto! @3xl/header-actions:px-[calc(--spacing(2)-1px)]"
className="w-7 sm:w-6 @3xl/header-actions:w-auto!"
aria-label="Add action"
// The tooltip wrapper replaces data-slot="button", so themed
// toolbar styling needs its own hook.