-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Expose DEV-mode warnings in devtools UI #20463
Merged
bvaughn
merged 104 commits into
facebook:master
from
eps1lon:devtools-show-warnings-in-tree
Dec 22, 2020
Merged
Changes from 21 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
443831b
STASH incomplete feature (no UI, some TODOs)
eps1lon 1a34269
Add UI
eps1lon 6cc7fdb
Add view for errors/warnings in inspected element
eps1lon 59ddad1
Serialize args
eps1lon 9372221
Ignore component stacks in inline errors view
eps1lon 34500ea
Add icons for warnings and errors
eps1lon 962f08c
Cleanup unused console logs
eps1lon 3104b1e
Fix flow issues
eps1lon cf3f212
Implement clear(all,byComponent,byErrorOrWarning)
eps1lon 5b3fb89
Expand showcase with error and warn/error mix
eps1lon d2c8e33
Fix missing color error background message
eps1lon dc92fef
Highlight elements in tree
eps1lon 1533583
Better spacing for error/warning badges
eps1lon 4b46d94
BROKEN Implement walking through elements with warning/errors
eps1lon ae89ee8
Remove nullish coalescing which is only used in the scheduling profiler
eps1lon 6e41fc1
Bail out if we have no errors/warnings
eps1lon 8de25ff
Hide inline errors toolbar if there are now errors at all
eps1lon 3560c40
Remove outdated todo
eps1lon 45f7562
Add keys for error/warn messages
eps1lon 1dafc3b
Diff cleanup
eps1lon e3e95fb
Fix flow errors due to missing type narrowing capabilities
eps1lon 2aafbdf
Match UI of Search
eps1lon 64ad2e2
Match UX of Search
eps1lon 826993e
Resolve todo about args copying
eps1lon eb9c4ec
Remove excess vertical ruler if no errors are recognized
eps1lon f0a3ab3
Fix icon alignment of errors/warnings in tree
eps1lon 5b59bbc
Fix warning text color in dark theme
eps1lon 0ef80bc
center icons with text instead of baseline
eps1lon 6192477
Clear errorsAndWarnings when elements are removed
eps1lon 6e57b4d
Tweaked inline element style for warning/error icons
2df0740
Fixed minor regression in Element styles
52f0494
Split errors and warnings into separate panels
d64023c
Implement new message format
eps1lon 1bb99d9
Reflect error/warning updates in tree when cleared
eps1lon c197030
Fix inspectedElement not updating on error/warnings update
eps1lon 2a3423f
fix minor flow issues
eps1lon 9df59c6
Fix style regressions during rebase
eps1lon bdf5d0e
Move Stepper UX to end of toolbar
eps1lon 3a37795
Cleanup WIP artifacts
eps1lon 91366be
Add tally of errors/warnings
eps1lon cc59c71
Remove nullish coalescing
eps1lon d164fac
Cleaned up CSS colors and made some other small UI tweaks
860d0e7
Make more room in toolbar
5cb19ac
Add new debug setting for showing inline warnings and errors
674e287
Strip component stacks from errors/warnings before passing them to fr…
0e0b8c7
Fixed a spot I missed with new inline warnings setting
5073d81
De-dupe warnings and errors and show badge count for duplciate entries
99de4ff
Fixed dedupe badge text contrast
095c118
Oops I left a console log statement in
e8b7dc5
Minor UI tweaks
3ab78da
Clean up component stack remove in messages
eps1lon 15122d2
Remove WIP artifacts
eps1lon 26cecfa
Fixed bug when calculating total error/warning count
1f1a161
Merge branch 'devtools-show-warnings-in-tree' of github.com:eps1lon/r…
caf8678
Use empty string instead of "fixing" the format string
eps1lon a4f0059
Fix test harness to avoid double logging
5719f31
Added a few more test cases to the inline error test harness
92ebd81
Show full message on click
eps1lon 70099e5
Revert 92ebd81
1b6e292
Show full error/warning text as tooltip on hover
61bf6a3
inline errors and warnings are not implemented in legacy devtools
eps1lon 46cea44
Added missing key error test
8b5c8d9
Move batching to backend/console
eps1lon 0146bc3
move filter into forEach
eps1lon 04ffb01
Added some basic tests for inline errors/warnings
9380545
Add tests for the store
eps1lon 8ff2c7b
Update snapshot due to previous typo fix
eps1lon 5824f48
Remove outdated snapshot
8fc6249
Refactored error/warning message queueing and bundling
f0ceff6
Fixed Store tests by updating to inline snapshots
1c1874c
Prevent siliencing of unexpected console calls in inspectedElementCon…
eps1lon ef149c9
Actually use generic param
eps1lon 5c892ac
Use inline snapshots
eps1lon 8953cdc
Add tests for clearing errors and warnings
eps1lon 268a25b
Run the minimal amount of timer necessary
eps1lon 6e167a3
Revert "Run the minimal amount of timer necessary"
eps1lon 69410ac
Added tests (and bug fix) for select next/prev error
6feb404
Fixed an error (but left a TODO for a better future fix)
da0aad2
Added two (failing) tests that we should fix
35b16ce
select(Prev|Next)Error -> select(Prev|Next)ErrorOrWarning
eps1lon af1c54e
Serialize errors and warnings in snapshots
eps1lon a0a8e06
Use statefulStore serializer in "inline error/warning" tests
eps1lon 5b5d2c5
Fix flow issues
eps1lon 4a87383
Refactored treeContext tests to use inline snapshots and Jest serializer
781d8b7
Inline warnings/errors should respect component filters
e69c0b4
Add error/warning counts to serialized store snapshot
bc788d8
Add failing test for uncommitted renders
eps1lon 22c3f4b
Don't send errors/warnings for suspended or errored subtrees
b9fa573
Wait to flush errors/warnings until the next commit; it's safer
4c9bf65
Remove separate 'errorsAndWarnings' event in favor of 'mutations'
a27fc21
Refactored next/prev index calculation and memoized error/warning count
83991b1
Serialize warn/error tally above roots
eps1lon ca5f050
Test multi-root app when testing next/prev error selection
eps1lon 51d3cac
Updated snapshots
4174fbd
Added multi-root tests for tree context wrapping
85ed51d
Merged in master
b79d1d9
Add docs for TREE_OPERATION_REMOVE_ROOT
eps1lon 6f15c87
Misc small things: Updated OVERVIEW, TODO, debug log, and minor forma…
fa41522
Cleanup after unmounted/never-mounted Fibers that have errors/warning…
aa5f89d
Auto-refresh inspected element right after cleaning warings/errors
5d10e41
Auto-refresh inspected element right after cleaning warings/errors
05a2825
Standalone CSS style fix for warning/error count font size
7e149e8
Pre-compute and cache the error/warning id-and-index tuples
5a3ae6c
Small variable naming cleanup in Store
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There are two places we call the console injection, but they're used for different purposes. The one from
src/hook
is used for React Native. The one inbackend/renderer
is used for the web extension. I guess the inline package (the one also used by the test shell) is odd because it technically has both calls.It would be nice for us to support this functionality for React Native as well.