Commit d49babc
authored
fix(dotcom): show open-state hint on main menu, page menu, and zoom menu triggers (tldraw#8813)
In tldraw.com the main menu, page menu, and zoom menu triggers did not
display the open-state hint (the subtle gradient highlight) when their
menus were open. The quick actions menu trigger does show the hint,
since it sits inside the SDK's main toolbar where a container-scoped CSS
rule turns it on.
Two underlying causes:
- The dotcom main menu trigger had a CSS rule that set the gradient
background on `[data-state='open']`, but the SDK's base
`.tlui-button::after` rule defaults to `opacity: 0`. Without setting
`opacity: 1`, the gradient was invisible.
- The SDK's hint rules for `[data-state='open']` triggers were scoped to
`.tlui-menu-zone` and `.tlui-main-toolbar`. The page menu and zoom menu
triggers can render outside both — for example in the dotcom layout — so
no rule turned on their hint when open.
Fix: add explicit hint rules on the page menu and zoom menu trigger
classes themselves, and set `opacity: 1` on the existing dotcom main
menu rule. The page menu uses a downward gradient (it opens down) and
the zoom menu uses an upward gradient (it opens up).
Closes tldraw#8812
### Change type
- [x] `bugfix`
### Test plan
1. Open tldraw.com.
2. Click the main menu trigger (top-left). The trigger should show the
gradient hint while the menu is open.
3. Click the page menu trigger. The trigger should show the gradient
hint while the menu is open.
4. Open the zoom menu (bottom-left). The trigger should show the
gradient hint while the menu is open.
5. Confirm the quick actions menu trigger still shows its hint when
open.
### Release notes
- Fix missing open-state hint on the main menu, page menu, and zoom menu
triggers in tldraw.com.1 parent d1c3563 commit d49babc
2 files changed
Lines changed: 11 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
331 | 336 | | |
332 | 337 | | |
333 | 338 | | |
| |||
789 | 794 | | |
790 | 795 | | |
791 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
792 | 802 | | |
793 | 803 | | |
794 | 804 | | |
| |||
0 commit comments