Commit 4a35137
PRO-1081: Make CodeMirror code viewer resizable
* PRO-1081: Make CodeMirror code viewer resizable
- Switch .CodeMirror from fixed height: 100px to min-height: 100px so the
box starts compact but can be dragged taller
- Add max-height: 600px to keep it bounded by default
- Set resize: vertical and overflow: hidden to enable the native resize handle
(overflow must be non-visible for CSS resize to work; CodeMirror-scroll
handles internal scrolling independently)
- Add ResizeObserver in CodeMirrorViewer to call cm.refresh() after each drag,
keeping line rendering correct after the container height changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* PRO-1081: Tighten ResizeObserver — rAF, guard, cancel on cleanup
- Default height 160px (down from 320px)
- Guard ResizeObserver construction behind window.ResizeObserver check
- Wrap refresh() call in requestAnimationFrame to avoid "ResizeObserver
loop limit exceeded" errors; cancel pending rAF on unmount
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 7d9c53c commit 4a35137
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
| 62 | + | |
| 63 | + | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
408 | 415 | | |
409 | 416 | | |
410 | 417 | | |
| |||
0 commit comments