-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feat: Add support for replaying :defined pseudo-class of custom elements #1155
Conversation
🦋 Changeset detectedLatest commit: 8cb6266 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This is great @YunFeng0817! One thing I’m wondering is if CustomElementRegistry.define() was never called during recording time this might lead to unexpected behavior. Maybe we should monkeypatch CustomElementRegistry.define() to make sure these are accurately captured |
Good suggestion. Do you think it's OK to change the data structure SerializedElement to this
|
@YunFeng0817 yes I think that works |
Applying Justin's review suggestion
@YunFeng0817 I think I've found another edge case for you that currently isn't handled by this PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great! Thanks @YunFeng0817!
Looks like you have a failing type check. When that's fixed feel free to merge this |
Hey folks, any blockers to merging this? It does help! Sentry has cherry picked this fix into our fork. |
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows. Cherry picks include the following upstream PRs: * rrweb-io#1096 * rrweb-io#1155 * rrweb-io#1257 * rrweb-io#1262 Cherry picks from getsentry fork: * #70 * #103 * 064d8c4 * e274f88 * cffefa2 * #20 --------- Co-authored-by: Michael Dellanoce <[email protected]> Co-authored-by: mdellanoce <[email protected]> Co-authored-by: Yun Feng <[email protected]> Co-authored-by: Francesco Novy <[email protected]> Co-authored-by: Lukas Stracke <[email protected]>
Any blockers to this PR? We really need this fix |
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows. Cherry picks include the following upstream PRs: * rrweb-io#1096 * rrweb-io#1155 * rrweb-io#1257 * rrweb-io#1262 Cherry picks from getsentry fork: * #70 * #103 * 064d8c4 * e274f88 * cffefa2 * #20 --------- Co-authored-by: Michael Dellanoce <[email protected]> Co-authored-by: mdellanoce <[email protected]> Co-authored-by: Yun Feng <[email protected]> Co-authored-by: Francesco Novy <[email protected]> Co-authored-by: Lukas Stracke <[email protected]>
…nts (rrweb-io#1155) * Feat: Add support for replaying :defined pseudo-class of custom elements * add isCustom flag to serialized elements Applying Justin's review suggestion * fix code lint error * add custom element event * fix: tests (rrweb-io#1348) * Update packages/rrweb/src/record/observer.ts * Update packages/rrweb/src/record/observer.ts --------- Co-authored-by: Nafees Nehar <[email protected]> Co-authored-by: Justin Halsall <[email protected]>
…stom elements (rrweb-io#1155) (#138) cherry-picks rrweb-io#1155 which was merged in our fork in #107 (prior to rrweb-io#1155 being merged). This results in only 2 small stylistic changes. Feat: Add support for replaying :defined pseudo-class of custom elements rrweb-io#1155 Co-authored-by: Yun Feng <[email protected]> Co-authored-by: Nafees Nehar <[email protected]> Co-authored-by: Justin Halsall <[email protected]>
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows. Cherry picks include the following upstream PRs: * rrweb-io#1096 * rrweb-io#1155 * rrweb-io#1257 * rrweb-io#1262 Cherry picks from getsentry fork: * #70 * #103 * 064d8c4 * e274f88 * cffefa2 * #20 --------- Co-authored-by: Michael Dellanoce <[email protected]> Co-authored-by: mdellanoce <[email protected]> Co-authored-by: Yun Feng <[email protected]> Co-authored-by: Francesco Novy <[email protected]> Co-authored-by: Lukas Stracke <[email protected]>
…nts (rrweb-io#1155) * Feat: Add support for replaying :defined pseudo-class of custom elements * add isCustom flag to serialized elements Applying Justin's review suggestion * fix code lint error * add custom element event * fix: tests (rrweb-io#1348) * Update packages/rrweb/src/record/observer.ts * Update packages/rrweb/src/record/observer.ts --------- Co-authored-by: Nafees Nehar <[email protected]> Co-authored-by: Justin Halsall <[email protected]>
Some websites use :defined pseudo-class for custom elements, e.g. https://store.google.com/us/product/pixel_7?hl=en-US
In the previous implementation, we don't define any custom elements during the playback so all :defined styles are not applied.
In this pull request, I add the support for replaying :defined pseudo-class of custom elements.
Replayer before this PR:
Replayer after this PR: