Commit Graph

878 Commits

Author SHA1 Message Date
Phil Leggetter
179e7e77d7 adds PostHog as users to the README (#719) 2021-10-06 09:11:23 +08:00
Yanzhen Yu
fe4342e8b8 gc virtual style map when DOM has been removed 2021-10-02 22:15:46 +08:00
Yanzhen Yu
53492c1ee4 improve type assertion, from #716 2021-10-01 15:27:45 +08:00
Yanzhen Yu
10375632ec fix lint warning 2021-10-01 15:05:34 +08:00
Eoghan Murray
b2f2b8e4ef Monkeypatch each iframe (#716)
* `setTimeout` and `clearTimeout` are global functions. Think the window versions of them were for the following reason: https://stackoverflow.com/questions/60245787/

* Comments and extra test here helped me understand which inserts were expected and which are to be ignored

* Add a test for the style setProperty/removeProperty added in #671

* Add a test to ensure that listeners get added correctly in nested iframes - particularly important for those which rely on prototype monkeypatching

* Pass in the window object from the current iframe so that monkeypatching applies to all windows

* Satisfy typings

* No need to insert an iframe as there's one already set up for us

* Enable the console logger to also intercept log messages within iframes

* There's no tests for FontFace but presumably the monkeypatching here works similarly to the others
2021-10-01 14:56:17 +08:00
Yanzhen Yu
fe43860376 fix props typo 2021-09-29 17:58:01 +08:00
John Pham
971c08adc1 Set the blockClass element's background color to the inherited color (#707)
* Set the blockClass element's background color to the inherited color

* Update snapshot

* Update snapshot
2021-09-25 23:54:49 +08:00
Justin Halsall
e67eb1cd09 Fixes #690 (#701)
Add nested css recording for safari
2021-09-21 22:36:45 +08:00
Justin Halsall
e441a05928 prefer yarn over npm (#705) 2021-09-16 18:59:39 +08:00
Lucky Feng
875e3c5bd2 improve config definition in the console plugin (#704)
One user encountered a type problem(https://rrweb.slack.com/archives/C01BYDC5C93/p1631683830050900). It turns out that definition of LogReplayConfig isn't perfect
2021-09-15 19:25:19 +08:00
Justin Halsall
e630cfb88e Keep blocked root elements as placeholders (#696)
* Keep blocked root elements as placeholders

`serializeNode` turns blocked elements into placeholder nodes so we need to make sure we don't remove these elements from the mutations when they get added.
We do however need to keep removing any children of these blocked elements from getting added or mutated.

* Update packages/rrweb/src/record/mutation.ts
2021-09-13 20:06:25 +08:00
Yanzhen Yu
c864e5b0e9 chore(release): publish new version
- rrweb@1.0.5
 - rrweb-player@0.7.7
2021-09-11 22:46:25 +08:00
Yanzhen Yu
83ef4138aa update lerna scripts 2021-09-11 22:46:06 +08:00
Yuku Kotani
5b40470dcf chek is CSSGroupingRule supported (#693) 2021-09-09 23:51:33 +08:00
Yanzhen Yu
b068241f8e close #688, remove legacy counter
A previous patch has refactored the canvas image loading process
and it does not use <img /> anymore, so the counter is no longer
need.

commit: 4a72ff0b3cdf9920ea38bca8f69eedbfe52c99904a0036f3fc1cd7c1e0248a37R725
2021-09-02 15:55:39 +08:00
dependabot[bot]
e9db702b48 Bump tar from 4.4.17 to 4.4.19 (#686)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.17 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.17...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-01 10:22:42 +08:00
Yanzhen Yu
df75d58fb0 chore(release): publish %s
- rrweb@1.0.4
 - rrweb-player@0.7.6
2021-08-30 21:41:48 +08:00
Yanzhen Yu
b711ff9114 hotfix rrweb es entry 2021-08-30 21:40:58 +08:00
Yanzhen Yu
5857c7b718 update typing files 2021-08-29 22:42:03 +08:00
yz-yu
5dcbfa530f impl #650, CSS declaration observer (#671) 2021-08-23 12:22:23 +08:00
Eoghan Murray
9e226b593f The desktop pointer cursor is not representative of mobile (#662)
* Simplify css for click animation

* Refactor to transfer responsibility for casting multiple synchronous to index.ts from machine.ts (so they can be dealt with in bulk)

* During synchronous application of a batch of events, move the mouse to the last position so that it's in the correct place when the timer starts

 - previous `needCastInSyncMode` added in 4bf533a675 meant that the isSync versions of MouseMove/TouchMove were being accidentally ignored
 - each synchronous MouseMove would have resulted in a separate mouse position update
 - the Click/TouchStart/TouchEnd events didn't have an async version

* The desktop pointer cursor is not representative of what is happening on a mobile device.

Instead, check a recording for any presence of a Touch event, and switch to a touch visualisation mode for the entire recording.
(for now, we use this mode even for mixed touch/mouse devices - this could be improved upon in future)

Show a round circle representing the users' finger which is visible only between TouchStart and TouchEnd events
Again this can be evolved upon, but this change should be a good start in the right direction.

* It's more correct to not have a transition for repositioning of touch as user can lift finger off screen and place elsewhere; however we can now have much smoother touch movement during the .touch-active phase as we know the finger is on the screen. This has a .25s delaying effect on the touch position which IMO is acceptable; e.g. scroll position can lag behind a touch movement and this seems to bring them more in sync

* Ensure we end up with the correct touch-active state after a series of synchronous events

* Important to discontinue tail animations and position transitions when user has lifted their finger and placed it into a new position. This is apparent in a replay session where the user is scrolling the page using repeated TouchMove bottom-to-top movements

* Simplify by unwrapping `mouseState.touchActive` and `mouseState.pos` into their own global vars
2021-08-17 15:05:47 +08:00
Justin Halsall
0bf53089da refactor nested style code (#667) 2021-08-15 16:41:40 +08:00
Yanzhen Yu
997e960feb fix registry in lock file 2021-08-15 16:15:31 +08:00
Yanzhen Yu
f95ee4dfec update yarn.lock 2021-08-15 15:53:29 +08:00
yz-yu
e6f1810144 Record and replay nested stylesheet rules (#666)
* fix typo

* record nested style rules

* Replay nested style rules

* handle index array in replayer

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2021-08-15 15:48:17 +08:00
Yanzhen Yu
8d881b1783 chore(release): publish %s
- rrweb@1.0.3
 - rrweb-player@0.7.5
 - rrweb-snapshot@1.1.8
2021-08-15 15:13:46 +08:00
Yanzhen Yu
9571c36d80 add lerna to manage monorepo 2021-08-14 23:58:56 +08:00
Eoghan Murray
e5b0750e90 Don't trust the html 'value' attribute on <option> - the DOM .selected is the one we want I think. (#651)
- encountered inconsistent html with multiple <option> elements with the same value attribute
 - due to check `attributes.selected = (n as HTMLOptionElement).selected;` the extra ones were being stored as `selected: false`; furthermore, the `false` value was being ignored upon replay, and so the last of the extra ones was being chosen as the 'selected' option
2021-08-14 15:17:17 +08:00
Eoghan Murray
c0fbfa7774 Revert some of the non-essential changes of #630 (for ease of merging other branches) (#652) 2021-08-14 14:56:57 +08:00
Eoghan Murray
009d73ab79 Fix that timer.addAction reverses order when splicing multiple events at same timestamp (#611)
* Add test for event ordering utilizing final html testing method added by Justin (with thanks)

* Found an error where two mutation events had the same timestamp, but one removed a node added in the other. The `actions.splice` method was reversing their order and triggering a 'Node with id [...] not found' error
2021-08-10 00:03:24 +08:00
Eoghan Murray
188f31eea9 Correct links in #647; think they were only working previously with an auto-redirect (#658) 2021-08-09 18:18:32 +08:00
Peter Chen
8d40e52010 fix: fix console plugin's OOM problem (#656)
* fix: fix console plugin's OOM problem

* fix: fix console plugin

* feat: patch

* feat: patch

* feat: patch

Co-authored-by: chenyangbj01 <chenyangbj01@fenbi.com>
2021-08-07 23:06:50 +08:00
Olivia Osborn
838287a16d Removed sn undefined warning (#572) 2021-08-03 13:09:43 +08:00
Yanzhen Yu
2cd978b335 update git ignore 2021-08-01 21:43:04 +08:00
dbseel
da721e4f5a DragEvent handling, null check fixes (#630) 2021-07-31 15:18:02 +08:00
Eoghan Murray
3301038869 Reference packages directly in docs (removing direct references to the old rrweb-snapshot and rrweb-player repositories) (#647) 2021-07-31 15:02:41 +08:00
Eoghan Murray
1dc8d688d2 Provide an option to only build rrweb-snapshot for inclusion in rrweb (#649) 2021-07-31 00:15:34 +08:00
Justin Halsall
588164aa12 Cache addHoverClass as it is quite expensive (#643)
* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Cache addHoverClass as it is quite expensive

https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Make cache non-optional

* Make cache required on addHoverClass
2021-07-26 22:13:03 +08:00
yz-yu
bdd869506c Merge pull request #595 from Mark-Fenng/monorepo
Merge rrweb, rrweb-snapshot, rrweb-player into a mono repository
2021-07-23 23:01:19 +08:00
Mark-fenng
4f0d21a053 update links of packages and README 2021-07-23 08:45:29 +08:00
Mark-fenng
6c34ffa7ce moved rrweb into packages/rrweb 2021-07-22 23:43:52 +08:00
Mark-fenng
734f70543c Merge branch 'rrweb-player' into monorepo 2021-07-22 18:55:41 +08:00
Mark-fenng
3383dd793a Merge branch 'rrweb-snapshot' into monorepo 2021-07-22 18:13:07 +08:00
Mark-fenng
407c09ed37 moved rrweb-player into packages/rrweb-player 2021-07-22 18:09:32 +08:00
Mark-fenng
bc319d510c moved rrweb-snapshot into packages/rrweb-snapshot 2021-07-22 17:54:51 +08:00
Yanzhen Yu
66e90f51f7 Release 0.7.4 2021-07-21 21:52:43 +08:00
Justin Halsall
7f7810936c Merge pull request #73 from fatihsolhan/patch-1
Add Vue.js version link to readme file
2021-07-21 11:33:28 +02:00
Justin Halsall
c6249c31ae Merge pull request #64 from rrweb-io/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.19 to 4.17.21
2021-07-21 11:17:14 +02:00
Justin Halsall
4e04bb631e Merge pull request #59 from Juice10/goto-play
Allow goto to specify if it should play or pause
2021-07-21 11:16:54 +02:00
Justin Halsall
fc7d804d6c Merge pull request #63 from Juice10/sourcemaps
Enables Source maps for the library
2021-07-21 11:16:35 +02:00