-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Single style capture #1437
Single style capture #1437
Commits on Aug 2, 2024
-
Unrelated, but the presence of a blank
<style></style>
element when…… checking the replay took me ages to debug as I thought it was something I introducedg
Configuration menu - View commit details
-
Copy full SHA for ea9f096 - Browse repository at this point
Copy the full SHA ea9f096View commit details -
Configuration menu - View commit details
-
Copy full SHA for 385dee8 - Browse repository at this point
Copy the full SHA 385dee8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 945bde3 - Browse repository at this point
Copy the full SHA 945bde3View commit details -
Recognize that snapshot.ts::serializeTextNode does important work for…
… mutations with `absoluteToStylesheet` - I had accidentally removed that with initial work
Configuration menu - View commit details
-
Copy full SHA for a6ef9c4 - Browse repository at this point
Copy the full SHA a6ef9c4View commit details -
Prep PR for async <style> serialization via assets: refactor stringif…
…yStylesheet to happen in a single place during initial snapshot.
Configuration menu - View commit details
-
Copy full SHA for bc769aa - Browse repository at this point
Copy the full SHA bc769aaView commit details -
Add a test to show how mutations on multiple text nodes within the <s…
…tyle> need to be tracked
Configuration menu - View commit details
-
Copy full SHA for b98c062 - Browse repository at this point
Copy the full SHA b98c062View commit details -
Multiple <style> text children: Demonstrate a failing test as CSS was…
…n't being assigned to correct text node, and provide remedy whereby css text is properly re-split upon rebuild
Configuration menu - View commit details
-
Copy full SHA for 6df62e1 - Browse repository at this point
Copy the full SHA 6df62e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 899911d - Browse repository at this point
Copy the full SHA 899911dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 173cd0f - Browse repository at this point
Copy the full SHA 173cd0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2983a19 - Browse repository at this point
Copy the full SHA 2983a19View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee0fab5 - Browse repository at this point
Copy the full SHA ee0fab5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f4e0b7 - Browse repository at this point
Copy the full SHA 3f4e0b7View commit details -
New function buildStyleNode to better encapsulate the separate behavi…
…our there and some explanatory comments
Configuration menu - View commit details
-
Copy full SHA for 8d440c3 - Browse repository at this point
Copy the full SHA 8d440c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d31ad7 - Browse repository at this point
Copy the full SHA 1d31ad7View commit details -
Add the css text length to the splits array as a method of checking t…
…hat the css hasn't been altered server-side/in-transit
Configuration menu - View commit details
-
Copy full SHA for 0067f5d - Browse repository at this point
Copy the full SHA 0067f5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b5dda7 - Browse repository at this point
Copy the full SHA 7b5dda7View commit details -
Add more tests and fix bug that was causing css text to end up in the…
… second text child instead of the first
Configuration menu - View commit details
-
Copy full SHA for 27832fe - Browse repository at this point
Copy the full SHA 27832feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7099d29 - Browse repository at this point
Copy the full SHA 7099d29View commit details -
Realize we don't actually need to look at the
.sheet
during a mutat……ion, even if there is only one text element on the <style>. Recent conversation with Justin has firmed up my thinking on why we look at .sheet in the first place (it's not because we want to get rid of vendor prefixes, which may actually be undesirable where they are useful for accurate replay in the replayer - but rather it's to ensure we don't miss any programmatic style mutations that have happened - have added comments to reflect this)
Configuration menu - View commit details
-
Copy full SHA for 2a7560a - Browse repository at this point
Copy the full SHA 2a7560aView commit details -
Fix the following typing problem in the tests:
rrweb:test: test/utils.ts:181:43 - error TS2345: Argument of type 'elementNode & { rootId?: number | undefined; isShadowHost?: boolean | undefined; isShadow?: boolean | undefined; } & { id: number; }' is not assignable to parameter of type '{ attributes: { src?: string | undefined; }; }'. rrweb:test: Types of property 'attributes' are incompatible. rrweb:test: Type 'attributes' has no properties in common with type '{ src?: string | undefined; }'. rrweb:test: rrweb:test: 181 stripBlobURLsFromAttributes(add.node);
Configuration menu - View commit details
-
Copy full SHA for 7a3d21e - Browse repository at this point
Copy the full SHA 7a3d21eView commit details -
Highlight that there is a replayer involved in this test (as well as …
…'record and replay style mutations')
Configuration menu - View commit details
-
Copy full SHA for b357b43 - Browse repository at this point
Copy the full SHA b357b43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91d29a5 - Browse repository at this point
Copy the full SHA 91d29a5View commit details -
Rather than recording a new separate error-prone _cssTextSplits attri…
…bute, mark the splits directly within the _cssText using CSS comments
Configuration menu - View commit details
-
Copy full SHA for 45f2953 - Browse repository at this point
Copy the full SHA 45f2953View commit details -
The
blankTextNodes
config option proved very confusing for both Jus……tin and Yun - 'cssCaptured' should dovetail better with the stylesheet-assets branch where capturing will happen asynchronously
Configuration menu - View commit details
-
Copy full SHA for 9fe426d - Browse repository at this point
Copy the full SHA 9fe426dView commit details -
Simplify as I don't think this warning is actually needed, and tests …
…should be covering all cases; would have only come into play if `applyCssSplits` was called without any child text nodes, which I can't imagine happening
Configuration menu - View commit details
-
Copy full SHA for c5d1ef0 - Browse repository at this point
Copy the full SHA c5d1ef0View commit details -
Caught a case where a text mutation, which bypasses
_cssText
, wasn'……t getting rebuilt with `adaptCssForReplay`
Configuration menu - View commit details
-
Copy full SHA for dd1bfee - Browse repository at this point
Copy the full SHA dd1bfeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46aa8f2 - Browse repository at this point
Copy the full SHA 46aa8f2View commit details -
I suspected this style of mutation was going to result in duplicate t…
…ext content, but I was mistaken; adding as I think it still has value in terms of regression
Configuration menu - View commit details
-
Copy full SHA for 8b9cc06 - Browse repository at this point
Copy the full SHA 8b9cc06View commit details -
Include another type of <style> addition to ensure it doesn't duplica…
…te content in mutation between _cssText and a text node
Configuration menu - View commit details
-
Copy full SHA for 3e9edbc - Browse repository at this point
Copy the full SHA 3e9edbcView commit details -
Fix case where we wouldn't have been able to mutate a <style> text no…
…de after a mutation as it's textContent wasn't getting a serialized id
Configuration menu - View commit details
-
Copy full SHA for b9622d0 - Browse repository at this point
Copy the full SHA b9622d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9d14ea - Browse repository at this point
Copy the full SHA a9d14eaView commit details -
feat: add test for recording and replaying style mutations with multi…
…ple child nodes Add a new integration test to verify that style mutations with multiple child nodes are recorded and replayed correctly. The test sets the color of two div elements using CSS and verifies that the color is applied correctly after replaying the recorded events.
Configuration menu - View commit details
-
Copy full SHA for 3156575 - Browse repository at this point
Copy the full SHA 3156575View commit details -
This is the effect of the following two changesets:
- Don't record css content twice when a <style> element is added in a mutation - Fix case where we wouldn't have been able to mutate a <style> text node after a mutation as it's textContent wasn't getting a serialized id
Configuration menu - View commit details
-
Copy full SHA for b358827 - Browse repository at this point
Copy the full SHA b358827View commit details -
Configuration menu - View commit details
-
Copy full SHA for 217e149 - Browse repository at this point
Copy the full SHA 217e149View commit details -
Configuration menu - View commit details
-
Copy full SHA for b932c98 - Browse repository at this point
Copy the full SHA b932c98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 876b109 - Browse repository at this point
Copy the full SHA 876b109View commit details -
Some extra reminder on these tests as I believe 'can record and repla…
…y style mutations' covers more ground. Could probably emphasize that these 2 are related to `insertRule` i.e. programmatic mutations as opposed to text mutations
Configuration menu - View commit details
-
Copy full SHA for 39007f1 - Browse repository at this point
Copy the full SHA 39007f1View commit details -
Fix regression on test [html file]: with-style-sheet-with-import.html
The prior 'dynamic stylesheet' route is now the main route for serializing a stylesheet; dynamic stylesheet were missed out in rrweb-io#1533 but are caught in this PR by the tests added in that PR as the stylesheet handling is simplified/centralised
Configuration menu - View commit details
-
Copy full SHA for 34def57 - Browse repository at this point
Copy the full SHA 34def57View commit details -
Make algorithm easier to understand while still ensuring the 'maintai…
…ns entire css text when there are too few child nodes' passes Co-authored-by: Justin Halsall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f40a053 - Browse repository at this point
Copy the full SHA f40a053View commit details -
add 'type' keyword in css.test.ts
Co-authored-by: Justin Halsall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7a93a1d - Browse repository at this point
Copy the full SHA 7a93a1dView commit details -
add cross-env to retest command in packages/rrweb/package.json
Co-authored-by: Justin Halsall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 83b3482 - Browse repository at this point
Copy the full SHA 83b3482View commit details -
Add break to short circuit when normalized string found
Co-authored-by: Justin Halsall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 63d79fb - Browse repository at this point
Copy the full SHA 63d79fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9770a16 - Browse repository at this point
Copy the full SHA 9770a16View commit details -
Add stripping of css comments and also semicolons to the `normalizeCs…
…sString` function (thanks Justin). Add test to show when this matters
Configuration menu - View commit details
-
Copy full SHA for 58bfecc - Browse repository at this point
Copy the full SHA 58bfeccView commit details