8000 Tags · jangtrinh/design-os-studio · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

v0.7.10

Toggle v0.7.10's commit message
designos 0.7.10

v0.7.9

Toggle v0.7.9's commit message
designos 0.7.9

v0.7.8

Toggle v0.7.8's commit message
designos 0.7.8

v0.7.7

Toggle v0.7.7's commit message
designos 0.7.7

v0.7.6

Toggle v0.7.6's commit message
designos 0.7.6

v0.6.4

Toggle v0.6.4's commit message
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.
0