-
Notifications
You must be signed in to change notification settings - Fork 1
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
Copy css rules from style #11
Conversation
…o#1431) * We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses * The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet - not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem: --- a/packages/rrweb-snapshot/test/rebuild.test.ts +++ b/packages/rrweb-snapshot/test/rebuild.test.ts @@ -151,6 +185,7 @@ describe('rebuild', function () { path.resolve(__dirname, './css/benchmark.css'), 'utf8', ); + cssText = cssText.replace(/:hover/g, ''); const start = process.hrtime(); addHoverClass(cssText, cache); * Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport * Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases * Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests * Apply formatting changes * Create rotten-spies-enjoy.md * Apply formatting changes * Add correct typing on `getSelectors` * Refactor CSS interfaces to include optional rules * Change `rules` to be non optional --------- Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com> Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
* Add HowdyGo to Who's using rrweb * Create twenty-goats-kneel.md --------- Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try/catch injection of recording script in rrweb repl and stream * Add empty changesets
* protect against a missing parent node during a mutation on an textNode
…layer (rrweb-io#1408) Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
…eb-io#1432) * Add support for capturing media attributes in rrweb-snapshot * Add loop to mediaInteractionParam * Add support for loop in RRMediaElement * Add support for recording loop attribute on media elements * Update video playback and fix bugs * Update cross-origin iframe media attributes and player state
* Fix known issues * Run format * Fix linting errors * Add comment in code for source of match logic * Add changeset
…xt" (rrweb-io#1369) * Add "types" field to fix error when using "moduleResolution": "NodeNext". * Add changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* better splitting of selectors - overlapping with rrweb-io#1401 * Add test from example at PostHog/posthog#21427 * ignore brackets inside selector strings * Add another test as noticed that it's possible to escape strings * Ensure we are ignoring commas within strings Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
…sion (rrweb-io#1441) performance: remove a nested function call and an object clone during event emission - rename `event` to `eventWithoutTime`, but maintain backwards compatibility - `eventWithTime` (with time) could be renamed to `event` in a future version This is an extension of PR rrweb-io#1339 authored by: mydea <mydea@users.noreply.github.com>
fix code for nodejs tests change fix direction to avoid issues with duplicate styles format issues swap waitForTimeout for waitForRAF in test that flaked Add unit tests for new functions Fix broken test causes by file formatting removing spaced
@mdellanoce and @colingm there is a conflict inside As best I can tell, we added the The other conflict is just versioning in package.json that seems straight forward. Can either of you have a look to confirm this? |
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.
Reviewed 10 of 71 files at r1, all commit messages.
Reviewable status: 10 of 71 files reviewed, all discussions resolved (waiting on @colingm and @mdellanoce)
If we have cross origin record turned on but we are in a child frame that has the same origin as its parent we end up in sort of an inefficient state. We will start the recording, record mutations, but then never actually emit them anywhere since inEmittingFrame and passEmitsToParent are both false. This is a waste of resources and we might as well just never start the recording.
fb5143a
to
8b10795
Compare
This PR contains changes to resolve several customer bugs related to playback issues around css rules getting dropped when style sheets are moved by rrdom's diff method.
I have also synced origin/master (pendo-io) w/ upstream/master (rrweb) and rebased my changes on that.
This change is