Suppress LogBox for low-severity errors and warnings if Fusebox console is available #44648
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.
Summary:
Changelog: [Internal]
Showing warnings and low-severity errors in LogBox is noisy, confusing for web developers, and not the best use of screen real estate on mobile platforms. Since the Fusebox console offers a superior experience, as of this diff we'll suppress warnings and low-severity errors in LogBox if we detect that Fusebox is available.
The first time a warning or error is suppressed (i.e. at most once per app launch), we'll show a "log" level notification pointing the user towards Fusebox. When the notification is clicked, we call the
DevSettings.openDebugger
method and dismiss it.The wording of the notification ("Open debugger to view logs") is intentional:
DevSettings.openDebugger
is a best-effort method that might fail, and in the current implementation there's no reliable feedback to the user about the success/failure of the launch.Differential Revision: D57681446