Skip to content

Lay the text style menu out like Figma's - #1696

Merged
quanvu309 merged 1 commit into
mainfrom
text-style-menu-figma-layout
Nov 25, 2026
Merged

quanvu309 merged 1 commit into
mainfrom
text-style-menu-figma-layout

Conversation

@quanvu309

Copy link
Copy Markdown
Collaborator

Summary

The Design panel's text style menu takes the layout of Figma's text style menu.

 <TypographyControl> (apps/web/src/design/controls/typography.tsx)
   <SelectTrigger>            the field, unchanged
-  <SelectContent>            320 px wide, right edge on the field
+  <SelectContent>            as wide as the field, left edge on the field
-    <SelectLabel>            small grey "Text styles"
+    <SelectLabel>            "Text styles" over a rule
-    <SelectItem>             painted in the style's own font and size, tick at the right
+    <SelectItem check="start">  one 14 px row, tick before the name, size in grey

SelectItem takes check, "end" by default, so every other select keeps its tick on the right.

Figma's edit-style popover and its add and library buttons are left out: a deck has eight fixed text styles, and the theme's font fields left the panel earlier.

Before / after

Annotated before and after: Text style menu

main this PR
main: Text style menu this PR: Text style menu

Evidence

  • Before: tests/browser/control-typography.spec.ts fails on main's menu: the rows have more than one font size.
    After: it passes 3 of 3. It checks one font size across the eight rows, the tick before the chosen name, one grey for every size while a row is highlighted, and the menu's left edge and width equal to the field's.
  • verify-airdesign look design-text-style reports 0 findings.

Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved

Merge Danger

Door: two-way

Blast Radius: small

One menu in the Design panel. No stored data, agent tool or canvas paint changes.

@github-actions github-actions Bot added the editor Touches the editor: canvas, slides, export and their screens label Nov 25, 2026
@quanvu309
quanvu309 merged commit d28d27a into main Nov 25, 2026
20 checks passed
@quanvu309
quanvu309 deleted the text-style-menu-figma-layout branch November 25, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor Touches the editor: canvas, slides, export and their screens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant