Commit 2ad7f73
authored
ENG-1792: Add edit block button to rendered dg-canvas (#1203)
* ENG-1792: Add edit block button to rendered dg-canvas
Overlay Button on the embedded canvas that focuses the underlying
{{dg-canvas}} block via setBlockFocusAndSelection, using the same
getUids/.roam-block idiom as the ResultsView Edit Block action so it
works in the right sidebar too.
* ENG-1792: Type the block container lookup as nullable
Review follow-up: getUids accepts a null element and returns empty
ids, so use the closest() generic instead of a non-null assertion.
* ENG-1792: Move edit button to bottom right of the canvas
Top right overlaps the tldraw style panel; bottom right is the corner
the plugin already uses for its cloud sync icon, offset left so both
fit.1 parent b09fb99 commit 2ad7f73
1 file changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
31 | 64 | | |
32 | 65 | | |
33 | 66 | | |
| |||
50 | 83 | | |
51 | 84 | | |
52 | 85 | | |
| 86 | + | |
| 87 | + | |
53 | 88 | | |
54 | 89 | | |
55 | 90 | | |
| |||
58 | 93 | | |
59 | 94 | | |
60 | 95 | | |
61 | | - | |
| 96 | + | |
62 | 97 | | |
63 | 98 | | |
64 | 99 | | |
| |||
0 commit comments