Commit 982cf2a
authored
fix(AudioPlayback): improve wave progress bar smoothness and sizing (#3094)
### π― Goal
The wave progress bar indicator jumps between positions during playback
and the waveform stops growing after a certain width, making the audio
player feel janky.
### π Implementation details
- **Smooth playback transitions:** Added 250ms linear CSS transitions on
the progress indicator (`inset-inline-start`) and amplitude bars
(`background`). The 250ms duration matches the browser's `timeupdate`
firing interval, so the indicator glides continuously between updates.
- **Instant drag response:** Added a `--dragging` modifier class toggled
via `useInteractiveProgressBar`. While active, transitions are disabled
so the handle tracks the pointer without lag.
- **Wave bar sizing:** Added `flex: 1` to the `__metadata` container so
the wave bar fills all available space instead of being capped at
content width.
### π¨ UI Changes
- Progress indicator glides smoothly during playback instead of jumping
bar-to-bar
- Amplitude bar colors fade smoothly between active/inactive states
- Wave bar now stretches to fill the full width of the voice recording
widget
- Dragging the handle remains instant with no transition lag1 parent d313317 commit 982cf2a
3 files changed
Lines changed: 19 additions & 4 deletions
File tree
- src/components
- Attachment/styling
- AudioPlayback
- components
- styling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| |||
0 commit comments