Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ [RUMF-902] enable new mutation observer #842

Merged
merged 9 commits into from
May 12, 2021

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented May 11, 2021

Motivation

Enable the mutation observer introduced in #810

Changes

  • Remove the experimental flag usages
  • Remove now unused related code
  • Move the MutationController into mutationObserver

Note

While working on this, I started thinking about a more in-depth cleaning in two ways:

  • redesign the 'rrweb-snapshot' logic. I did not forget about this comment, and I think we can drastically simplify the design of the whole file, for example to avoid serializing ignored nodes.

  • move modules around. I'd like to:

    • move rrweb-snapshot (serialization logic) and the privacy module closer to the rest of the 'rrweb' codebase
    • rename domain/rrweb to domain/record
    • rename domain/{segment,segmentCollection,deflateWorker} to domain/segmentCollection/*

This will be done later, in separate PRs though.

Testing

Unit, E2E


I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner May 11, 2021 17:43
Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

Copy link
Contributor

@vlad-mh vlad-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me, thanks for the cleanup Benoit!
the follow up plan seem good as well, I'll be happy to see those PRs

@codecov-commenter
Copy link

Codecov Report

Merging #842 (419e894) into main (36683df) will increase coverage by 1.50%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #842      +/-   ##
==========================================
+ Coverage   86.75%   88.25%   +1.50%     
==========================================
  Files          82       81       -1     
  Lines        3918     3670     -248     
  Branches      884      821      -63     
==========================================
- Hits         3399     3239     -160     
+ Misses        519      431      -88     
Impacted Files Coverage Δ
packages/rum-recorder/src/boot/recorder.ts 100.00% <ø> (ø)
...es/rum-recorder/src/domain/rrweb-snapshot/types.ts 100.00% <ø> (ø)
packages/rum-recorder/src/domain/rrweb/types.ts 100.00% <ø> (ø)
packages/rum-recorder/src/domain/rrweb/utils.ts 83.33% <ø> (+0.35%) ⬆️
...rum-recorder/src/domain/rrweb-snapshot/snapshot.ts 80.91% <100.00%> (+0.58%) ⬆️
.../rum-recorder/src/domain/rrweb/mutationObserver.ts 99.15% <100.00%> (+0.04%) ⬆️
packages/rum-recorder/src/domain/rrweb/observer.ts 76.33% <100.00%> (-0.53%) ⬇️
packages/rum-recorder/src/domain/rrweb/record.ts 63.04% <100.00%> (-0.96%) ⬇️
packages/rum-core/src/transport/batch.ts 74.28% <0.00%> (+11.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36683df...419e894. Read the comment docs.

@BenoitZugmeyer BenoitZugmeyer merged commit 428f294 into main May 12, 2021
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/enable-new-mutation-observer branch May 12, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants