fix(web): keep the workspace title from stretching between tabs (UF-049)
The title carries a framer-motion layoutId for the card-to-header hero morph, which also animates any change of its box. With a short workspace name the title is as wide as the subtitle row; hiding that row on the Chat tab changed the width, and framer animated it as a horizontal scale (2.9x for "Eng"). Both titles now use layout="position": only the position animates, and the hero morph still moves the name into place. The hero-morph test checks it.
This commit is contained in:
@@ -525,6 +525,9 @@ const WorkspaceDesktopApp = ({
|
||||
<div className="mb-1.5 h-2.5 w-24 rounded bg-[var(--surface-2)] animate-pulse motion-reduce:animate-none" aria-hidden="true" />
|
||||
<motion.h2
|
||||
layoutId={heroNameId}
|
||||
// Text must not scale: the title's width follows the header row,
|
||||
// which changes between tabs (UF-049). Only its position travels.
|
||||
layout="position"
|
||||
transition={SPRING.expressive}
|
||||
className="truncate font-display text-[clamp(20px,2.4vw,28px)] font-semibold leading-tight tracking-[-0.02em] text-[var(--text)]"
|
||||
>
|
||||
@@ -645,6 +648,9 @@ const WorkspaceDesktopApp = ({
|
||||
</div>
|
||||
<motion.h2
|
||||
layoutId={heroNameId}
|
||||
// Text must not scale: the title's width follows the header row,
|
||||
// which changes between tabs (UF-049). Only its position travels.
|
||||
layout="position"
|
||||
transition={SPRING.expressive}
|
||||
className="truncate font-display text-[clamp(20px,2.4vw,28px)] font-semibold leading-tight tracking-[-0.02em] text-[var(--text)]"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user