Repository navigation
Tags
Tags
fix(app): cut frame name labels to fit the way Figma does (#1239) Fixes #1197 Stacked on the #1193 fix; merge after it. ## Problem Frame name labels on the canvas overlap when frames sit close together ("GridCard"). ## Fix Labels are cut to fit the same way Figma cuts them: - the label is measured with the app's own fonts; - a 4.5 px right inset is taken off the frame's on-screen width before the name is cut with "…"; - a component or instance glyph comes first, and if the glyph plus "…" does not fit, only "…" is painted. | Frame | Figma 68% | Studio 68% | |---|---|---| | A frame with a very long name that overflows | A frame with a very lon… | A frame with a very lon… | | Second frame with a long name too | Second frame with a lo… | Second frame with a lo… | | Narrow frame name (40) | N… | N… | | Thirty (30) | … | … | | Tiny (15) | … | … | The 200% captures match as well. ## Controller gate (`0063ee15`) fmt 0, clippy 0, gpu and lib tests pass, zero-fake 0, spacing 0. `designos` bin: 3327 passed, 1 failed (the known #996 flake, which passed 3/3 alone). ## Not verified Hover, sections, the smallest zoom level, and the glyph threshold on very narrow components: these were not compared with Figma.
PreviousNext