Commit Graph

22 Commits

Author SHA1 Message Date
yz-yu
081781d1ca add checkout config to recorder (#36)
* add checkout config to recorder

* add test cases for checkout feature and extract assertSnapshot method
2026-04-01 12:00:00 +08:00
Yanzhen Yu
21465e785f resolve #13 add warning messages when target is not found 2026-04-01 12:00:00 +08:00
Yanzhen Yu
73983e7e78 add skipInactive option
Skip inactive time is an important and useful feature. We consider
user interaction events as active, and check next user interaction
event after apply incremental snapshot.
If next user interaction event has a time gap larger than the
threshold, we will set a dynamic speed value which will skip the
inactive time interval in about 5 seconds.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
0995b7a6d3 basic impl of wait for stylesheet loaded 2026-04-01 12:00:00 +08:00
edwardwu
05530551df resolve #4 Improve timer's performance by storing all callbacks in an array (#5) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
cbe80dbd2e also resolve missing previous node 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b7bf5f5fe3 Fix add node logic with missingNextNodeMap
This patch include a breaking change to the recorder's event data.

We used to consider mirror.getId will always return the id of the
target node because we keep serialize every node. But if we call
mirror.getId before serialization then bug happened. This could
happen when we get nextId of newly added nodes if its next sibling
was also newly added.
So we have to return -1 as the id of node which was not serialized
and when we building added nodes in the replayer we should handle
this.

For example, nodes el1, el2 were added together and el1's nextId
will be -1 since el2 was not serialized at that moment. Now we
call el1 as a 'missing next node' and not append it into the DOM
tree after building, instead we store it in a missingNextNodeMap.
After a added node in the same mutation was successfully appened
we will check whether it has a previous id and the id was pointed
to some nodes in the map, if so, we will insert that node before
it and delete the node from map.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
7a57784daf Implement #2: simulate hover event 2026-04-01 12:00:00 +08:00
Yanzhen Yu
609f51a26a add a has method to mirror for checking whether an id is in the map 2026-04-01 12:00:00 +08:00
Yanzhen Yu
aa3e2f02ed rewrite mutation observer handler with lazy child list calculation 2026-04-01 12:00:00 +08:00
Yanzhen Yu
487f1d0c9a add meta event and fix childList observer, also update related replayer 2026-04-01 12:00:00 +08:00
Yanzhen Yu
eb56afa59f export more props of replayer to the UI 2026-04-01 12:00:00 +08:00
Yanzhen Yu
e040ae76c5 align id map by skip extra added nodes 2026-04-01 12:00:00 +08:00
Yanzhen Yu
4446e27899 fix scroll value and record viewport when loaded 2026-04-01 12:00:00 +08:00
Yanzhen Yu
41b9861fbf improve record method and bump 0.2.0 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c96052d8a4 add input event observer and hook the value setter 2026-04-01 12:00:00 +08:00
Yanzhen Yu
ad2ac811a3 serialize newly added nodes and update id node map when childList changed 2026-04-01 12:00:00 +08:00
Yanzhen Yu
ee4fc3ce7e add scroll and viewport resize observers 2026-04-01 12:00:00 +08:00
Yanzhen Yu
7078ce2f2a add mouse interactions observer 2026-04-01 12:00:00 +08:00
Yanzhen Yu
61312a0ad0 add mouse movement observer 2026-04-01 12:00:00 +08:00
Yanzhen Yu
d2175eae87 change observed mutations into serializable records 2026-04-01 12:00:00 +08:00
Yanzhen Yu
e2fbecea96 init the repo and integrate rrweb-snapshot 2026-04-01 12:00:00 +08:00