Commit e0e12de
authored
feat(layers): add Style panel button to layer cards (#1944)
* feat(layers): add Style panel button to layer cards
Opening a layer's styling controls previously meant finding the entry
inside the layer's overflow menu. A palette button on the card itself
selects the layer and opens the Style panel in one click, and the action
row now wraps so the extra button does not overflow on narrow panels.
* Address review feedback
- Return early from the layer card key handler when the event came from a
nested control. The card is a role="button" wrapper that called
preventDefault on Enter, which cancelled the native activation of every
action button inside it, the new palette button included.
- Add an e2e test that opens the Style panel from the card by Enter and by
Space. It fails without the guard above.
- Match the Style panel aside by exact accessible name, so the collapsed
rail ("Layer style (collapsed)") cannot satisfy the default substring
match and mask the initial toHaveCount(0) assertion.
- Note in the user guide that the palette button appears only when the
built-in Style panel is enabled, since onOpenStylePanel is optional.1 parent d036067 commit e0e12de
3 files changed
Lines changed: 65 additions & 1 deletion
File tree
- apps/geolibre-desktop/src/components/panels
- docs/user-guide
- e2e
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3210 | 3210 | | |
3211 | 3211 | | |
3212 | 3212 | | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
3213 | 3217 | | |
3214 | 3218 | | |
3215 | 3219 | | |
| |||
3389 | 3393 | | |
3390 | 3394 | | |
3391 | 3395 | | |
3392 | | - | |
| 3396 | + | |
3393 | 3397 | | |
3394 | 3398 | | |
3395 | 3399 | | |
| |||
3449 | 3453 | | |
3450 | 3454 | | |
3451 | 3455 | | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
3452 | 3472 | | |
3453 | 3473 | | |
3454 | 3474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
0 commit comments