-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(hydration error): Create a tree-view that highlights dom mutations directly #80808
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #80808 +/- ##
==========================================
+ Coverage 74.97% 78.39% +3.41%
==========================================
Files 7207 7208 +1
Lines 319509 319549 +40
Branches 44001 44003 +2
==========================================
+ Hits 239546 250498 +10952
+ Misses 73442 62671 -10771
+ Partials 6521 6380 -141 |
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.
How many times does replayStepper run when we open this modal?
queryFn: () => | ||
extractDiffMutations({replay, rangeStartTimestampMs, rangeEndTimestampMs}), | ||
enabled: true, | ||
gcTime: 0, // Infinity, |
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.
oops, had this set to 0
for testing because i didn't want the cache to kick in so often.
Bundle ReportChanges will increase total bundle size by 44.89kB (0.14%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
I was thinking about adding a feature-flag around this.. but it's pretty deep inside the workflow, so i think I might not 'need' it even if it's a good habit in all cases. Exception to the rule! |
I had an idea that maybe we should be formatting the html. However the add/remove sections show potentially huge chunks of html though, which could be a perf hit. So with that, lets let formatting be a followup task if this proves an interesting tool. |
Added a docs PR to go along with this new tool: getsentry/sentry-docs#11883 |
Hello! I had a look at this feature this morning and am providing some UX feedback as a developer who:
Th mutations tab is an interesting window into the internals happening with a Hydration Error, but I'm having trouble understanding how the mutations relate to the HTML Diff, and therefore finding the mutations tab largely useless. e.g. This HTML diff begins at either a div or a style tag (depending on if you consider the before or after) And here on the mutations tab, I don't really see anything that matches the HTML diff, and it doesn't give me any really useful information The ways in which I could interpret this is So my questions are:
This is also a valid option: maybe we are assuming prior knowledge intentionally, and maybe, as someone who doesn't use Next.js all the time, maybe I'm not the target audience. But I would also argue that displaying these kinds of features in a more "you can understand what's going on here even if you don't have any prior experience with this particular thing" would help prove the use of Sentry earlier on. I have two more questions for you:
I actually think the text diff was more immediately useful (showcased in this blog https://blog.sentry.io/sentry-cant-fix-react-hydration-errors-but-it-can-really-help-you-debug-them/) |
Fixes #74358