Merge pull request #2533 from heygen-com/fix/studio-promotable-badge-overlap

fix(studio): reserve a gutter for the promote-to-variable badge
This commit is contained in:
Vance Ingalls
2026-07-16 02:06:28 -07:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
@@ -81,7 +81,9 @@ export function PromotableControl({
{rendered}
{bound && (
<span
className="pointer-events-none absolute right-1.5 top-0 z-10 inline-flex max-w-[60%] items-center gap-1 truncate rounded bg-studio-accent/20 px-1 py-px font-mono text-[8px] font-medium text-studio-accent"
// Sits above the row (not on top of top-0) so it clears a value that
// renders flush to the row's right edge, e.g. flat Font/Color rows.
className="pointer-events-none absolute -top-2 right-1.5 z-10 inline-flex max-w-[60%] items-center gap-1 truncate rounded bg-studio-accent/20 px-1 py-px font-mono text-[8px] font-medium text-studio-accent"
title={`Bound to variable "${promote.boundId}"`}
>
{promote.boundId}
@@ -95,7 +97,7 @@ export function PromotableControl({
e.stopPropagation();
promote.promote();
}}
className="absolute right-1.5 top-0 z-10 inline-flex items-center gap-1 rounded bg-neutral-800/80 px-1 py-px font-mono text-[8px] font-medium text-neutral-400 opacity-70 transition-colors hover:bg-studio-accent/20 hover:text-studio-accent hover:opacity-100"
className="absolute -top-2 right-1.5 z-10 inline-flex items-center gap-1 rounded bg-neutral-800/80 px-1 py-px font-mono text-[8px] font-medium text-neutral-400 opacity-70 transition-colors hover:bg-studio-accent/20 hover:text-studio-accent hover:opacity-100"
>
var
</button>
@@ -267,7 +267,7 @@ export function FlatTextSection({
if (textFields.length > 1) {
return (
<div className="space-y-1.5">
<div className="space-y-2.5">
<FlatTextLayerList
fields={textFields}
activeFieldKey={activeField.key}
@@ -295,7 +295,7 @@ export function FlatTextSection({
}
return (
<div className="space-y-1.5">
<div className="space-y-2.5">
<FlatTextFieldEditor
field={activeField}
styles={styles}