Commit 470fb5d
authored
ENG-1766 Fix suggestive mode reflow on first panel open and close (#1049)
* ENG-1766 Fix suggestive mode reflow on first panel open and close
Two fixes for the visible width animation when toggling the suggestive
mode sidebar at small/medium/large spacing modes:
- Use useLayoutEffect for setupSplitView so the flex layout and
article wrapper width override land before the browser paints.
Avoids the intermediate frame where the panel sits as a block
sibling and the wrapper is at default width.
- Suppress CSS transitions on .rm-article-wrapper during setup and
teardown via a new applyWithoutTransition helper, then restore on
the next frame. Roam's stylesheet animates padding/max-width on
spacing changes; the same transition fired when we wrote our
overrides.
Also adds a 1.5rem gap on .roam-body-main so the wrapper does not
butt against the panel.
* Use tailwind classes for split-view flex/gap1 parent 56a53fb commit 470fb5d
2 files changed
Lines changed: 39 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
3 | 9 | | |
4 | 10 | | |
| |||
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
94 | 116 | | |
95 | 117 | | |
96 | 118 | | |
| |||
99 | 121 | | |
100 | 122 | | |
101 | 123 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
106 | 130 | | |
0 commit comments