Commit 949fdc7
authored
fix(fairies): move FairyHUD to InFrontOfTheCanvas layer (tldraw#7221)
Moves the FairyHUD and FairyHUDTeaser components to render in the
`InFrontOfTheCanvas` layer instead of `Overlays`. This positions the
fairy HUD above the canvas content but below other UI elements like
toolbars.
### Change type
- [x] `improvement`
### Test plan
1. Open a file in the editor
2. Verify the fairy HUD teaser appears above canvas shapes but below UI
elements
- [ ] Unit tests
- [ ] End to end tests
### Release notes
- Moved fairy HUD to render in front of canvas layer for better z-index
positioning.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Render FairyHUD in the in-front-of-canvas layer and tweak
z-index/animation so the HUD and cookie banner stack correctly.
>
> - **Editor (`TlaEditor.tsx`)**
> - Move `FairyHUD` rendering from `Overlays` to `InFrontOfTheCanvas`
with fallback to `FairyHUDTeaser`.
> - Keep `Overlays` for `FairyVision`, `RemoteFairies`, and `Fairies`
only when `canShowFairies`.
> - Add default `components.InFrontOfTheCanvas` to always show
`FairyHUDTeaser` (outside instance-specific config).
> - **Styling**
> - Set `--tl-layer-canvas-in-front: 499` on `.tla .tl-container` to
control stacking.
> - Update cookie consent panel: adjust translate to `62%`, shorten
animation to `3s`, change timing to `ease-out`, and align `@keyframes`
start.
> - Raise `.cookieConsentWrapper` to `z-index:
var(--tl-layer-canvas-in-front)`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d733d35. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 37f961f commit 949fdc7
3 files changed
Lines changed: 23 additions & 11 deletions
File tree
- apps/dotcom/client/src/tla
- components
- TlaEditor
- dialogs
- styles
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
0 commit comments