Commit 427f064
authored
fix(dotcom): polish workspace settings dialog scrolling and layout (tldraw#9284)
In order to polish the manage workspace dialog from tldraw#9268, this PR makes
the tab-page scrollbar appear only when content actually overflows,
sizes the dialog body so it stops jumping around, and tidies a few
labels and disabled-state styles.
- Scrollbar only appears when a tab page actually overflows. The
container stays `overflow: hidden` and a `useScrollbarWhenScrollable`
callback ref measures the content with a `ResizeObserver`, adding a
`.scrollable` class that flips to `overflow: auto` only when needed.
This avoids a permanent scrollbar/gutter on systems that always render
scrollbars.
- Sized the dialog body with a `max-height`/`min-height` so it doesn't
jump around as content changes.
- Renamed the sidebar workspace action label from "Settings" to
"Manage".
- Renamed the "Enable invite link" label to "Enable invites".
- Disabled inline buttons now dim via text color instead of opacity.
- Bumped the empty-state text contrast (`text-3` → `text-1`).
### Change type
- [x] `improvement`
### Test plan
1. Open the manage workspace dialog from the sidebar "Manage" action.
2. With few members, confirm neither tab page shows a scrollbar or
gutter.
3. Add members until a tab page overflows and confirm the scrollbar
appears only then.
4. Switch between the Members and Settings tabs and confirm the dialog
body height stays stable.
5. Confirm disabled inline buttons dim and the "Enable invites" label
reads correctly.
- [ ] Unit tests
- [ ] End to end tests
### Release notes
- Polish scrolling and layout in the manage workspace dialog.
### Code changes
| Section | LOC change |
| ------- | ---------- |
| Apps | +40 / -11 |1 parent 1299eeb commit 427f064
5 files changed
Lines changed: 58 additions & 20 deletions
File tree
- apps/dotcom/client
- public/tla
- locales-compiled
- locales
- src/tla/components
- TlaSidebar/components
- dialogs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
248 | 254 | | |
249 | 255 | | |
250 | 256 | | |
| |||
621 | 627 | | |
622 | 628 | | |
623 | 629 | | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1016 | 1022 | | |
1017 | 1023 | | |
1018 | 1024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
468 | 471 | | |
469 | 472 | | |
470 | 473 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
48 | 66 | | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
| |||
339 | 359 | | |
340 | 360 | | |
341 | 361 | | |
342 | | - | |
| 362 | + | |
343 | 363 | | |
344 | 364 | | |
345 | 365 | | |
| |||
424 | 444 | | |
425 | 445 | | |
426 | 446 | | |
427 | | - | |
| 447 | + | |
428 | 448 | | |
429 | 449 | | |
430 | 450 | | |
431 | 451 | | |
432 | 452 | | |
433 | | - | |
| 453 | + | |
434 | 454 | | |
435 | 455 | | |
436 | 456 | | |
| |||
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
204 | 206 | | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
233 | | - | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| |||
323 | 332 | | |
324 | 333 | | |
325 | 334 | | |
326 | | - | |
| 335 | + | |
327 | 336 | | |
328 | 337 | | |
329 | 338 | | |
| |||
0 commit comments