Skip to content

fix(avatar): proportional square-avatar radius so rooms aren't circles#963

Merged
mremond merged 1 commit into
mainfrom
fix/room-avatar-square-radius
Jul 10, 2026
Merged

fix(avatar): proportional square-avatar radius so rooms aren't circles#963
mremond merged 1 commit into
mainfrom
fix/room-avatar-square-radius

Conversation

@mremond

@mremond mremond commented Jul 10, 2026

Copy link
Copy Markdown
Member

Follow-up to #961, which merged before this fix landed.

#961 routed search room avatars through RoomAvatar (shape="square"), but Avatar hard-coded rounded-xl (12px) for every square size. On a 24px (xs) box a 12px radius equals half the side length — a full circle — so room avatars in search results and the command palette still rendered as circles at that size.

This makes the square corner radius a percentage (rounded-[28%]). A percentage border-radius is relative to the element's own size, so a single value reads as the same rounded-square at every avatar size, rather than a fixed px radius whose corner/size ratio drifts (circle at 24px, barely rounded at 96px). This also makes room-avatar rounding consistent across the app.

Verified rounded-[28%] compiles to border-radius: 28% in-app.

Follow-up to #961. That PR routed search room avatars through RoomAvatar
(shape="square"), but Avatar hard-coded rounded-xl (12px) for every square
size — and 12px on a 24px (xs) box equals half the side, i.e. a full
circle. So room avatars in search and the command palette still rendered
as circles at xs.

Make the square radius a percentage (rounded-[28%]). A percentage radius
is relative to the element's own size, so one value reads as the same
rounded-square at every avatar size, instead of a fixed px radius whose
corner/size ratio drifts (circle at 24px, barely rounded at 96px).
@mremond mremond added this to the 0.17.1 milestone Jul 10, 2026
@mremond mremond merged commit 7219610 into main Jul 10, 2026
3 checks passed
@mremond mremond deleted the fix/room-avatar-square-radius branch July 10, 2026 13:15
mremond added a commit that referenced this pull request Jul 10, 2026
CI jobs had no `timeout-minutes`, so a hung step could park a runner for
GitHub's 6h default (as seen on #963, where a slow apt mirror stretched
the Playwright OS-dep install to ~35min). Separately, scroll
`invariant-1` flaked intermittently on webkit under CI load, burning
retries and printing scary red mid-log.

- **Fail-fast timeouts** on all three jobs (test 15m, e2e-scroll 30m,
rust 20m) so a genuine hang fails instead of sitting for hours.
- **Cache Playwright browser binaries** and split the OS-dep
(`install-deps`) step so a slow CDN can't add minutes to the browser
download.
- **De-flake invariant-1**: raise the demo-mount `waitForSelector`
ceiling to 45s (webkit is slow to boot the demo bundle on a busy
runner), and wait for the prepend restore to *settle* before the drift
assertion instead of a single racy read. The settle-wait polls until
drift stabilises without loosening `PREPEND_DRIFT_PX`, so a genuinely
broken anchor still fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant