Commit 0c7cea2
authored
COMPASS-1319: Backport COMPASS-1318 Make EditableElement expand button hit box larger (#1119) (#1122)
* 🐛 COMPASS-1318 Make EditableElement expand button hit box larger
By using padding instead of margins, as margins are not clickable, but padding is.
* 🐛 Add onClick handler to document keys
From review feedback:
> Quick question though: would it be easy to include the field name as a clickable area? I believe this got lost at some point. if it's a small change, can you just add it here?
Tested against both view mode and editing mode. AFAICT it seems to still respond intuitively, e.g. I can still double-click to select text independent of mode, single click to select a specific part of the key in edit mode, click and drag to select a part of the key in edit mode, etc.
More importantly, if I attempt to move the handler upwards into renderExpandable, then in edit mode, clicking on the editable key does NOT toggle the dropdown, which is an easy mistake I nearly made :)
* 🔥 Remove unused renderStyle function
* 🐛 Increase padding
The part between the arrow button and document key also should be clickable.1 parent 25883f7 commit 0c7cea2
File tree
2 files changed
+3
-18
lines changed- src/internal-packages/crud
- lib/component
- styles
2 files changed
+3
-18
lines changedLines changed: 2 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | 285 | | |
301 | 286 | | |
302 | 287 | | |
| |||
320 | 305 | | |
321 | 306 | | |
322 | 307 | | |
323 | | - | |
| 308 | + | |
324 | 309 | | |
325 | 310 | | |
326 | 311 | | |
| |||
344 | 329 | | |
345 | 330 | | |
346 | 331 | | |
347 | | - | |
| 332 | + | |
348 | 333 | | |
349 | 334 | | |
350 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments