fix: replay timestamps
Problem
Closes https://github.com/PostHog/posthog/issues/21834 Addresses https://posthog.slack.com/archives/C03PB072FMJ/p1714032531933589
Changes
Switch button to use monospaced font to stop jumping
On top of the issue called out by the customer the inspector timestamps did not match the player toggle
| Before | After |
|---|---|
Also fixes a performance issue given the TZLabel assumes that the timestamp is always changing which means unnecessary intervals being computed every second. And recomputes the timezone every second, for every timestamp on the page:
Luckily for us the inspector is a virtualized list or the number of intervals would be much greater.
You can see the blips in CPU every second as these timers are processed (even when the recording is paused). Afterwards the CPU line looks flat.
| Before | After |
|---|---|
(Fix for the TZLabel component coming in a future PR)
Size Change: +524 B (0%)
Total Size: 1.05 MB
ℹ️ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
1.05 MB | +524 B (0%) |