Commit e383f9b
committed
fix(notes): address review findings on teleprompter mode
Play was a no-op whenever there was nothing left to scroll: a note that fits
the window, or a run that had already reached the bottom, flipped the button to
Pause and back within two frames. isAtTeleprompterEnd() now reports the end only
when there is somewhere to go, and starting playback at the bottom rewinds to
the top instead of leaving the control looking inert.
Playback also tracked its position through the DOM, re-reading scrollTop every
frame. At the slowest speed a frame advances ~0.17px, which an engine that snaps
scroll offsets to whole pixels would round away, stalling the teleprompter.
resolveTeleprompterPosition() keeps the fractional position internally and hands
control back to the DOM once it drifts past a pixel, so scrolling by hand
mid-playback still moves the teleprompter rather than fighting it.
Also:
- Drop NotesToolbar.browser.test.tsx and port what jsdom can assert into
NotesToolbar.test.tsx. vitest.config.ts excludes src/**/*.browser.test.*, and
the repo has no vitest.browser.config.ts and no test:browser script, so the
file never ran anywhere — CI included.
- Restore the no-scrollbar utility the toolbar lost when it was split into two
rows; without it both rows paint a horizontal scrollbar once they overflow.
- Convert the remaining tiptap spacing to em so it tracks the teleprompter font
size. Identical at the default 16px; heading margins stay in rem because em
there resolves against the heading's own enlarged size.
- Stop announcing playback twice: the play button keeps its state-dependent
label and drops aria-pressed, via a new highlighted prop that styles without
the toggle semantics.
- Make the note read-only while playing and disable formatting with it, so a
keystroke can no longer yank the scroll through scroll-caret-into-view.
- Move the generic units.* keys from the launch namespace to common.
- Skip the mount-time settings write, load the initial note once, and drop a
no-op transform-origin rule.1 parent afac668 commit e383f9b
34 files changed
Lines changed: 411 additions & 228 deletions
File tree
- src
- components/launch
- i18n/locales
- ar
- en
- es
- fr
- it
- ja-JP
- ko-KR
- pt-BR
- ru
- tr
- vi
- zh-CN
- zh-TW
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
134 | 175 | | |
135 | 176 | | |
136 | 177 | | |
| |||
142 | 183 | | |
143 | 184 | | |
144 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
0 commit comments