Repository navigation
[NEW] Fallback Error component for Engagement Dashboard widgets - #26441
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #26441 +/- ##
===========================================
- Coverage 38.54% 38.50% -0.04%
===========================================
Files 758 758
Lines 18827 18816 -11
Branches 1453 1459 +6
===========================================
- Hits 7256 7246 -10
+ Misses 11355 11350 -5
- Partials 216 220 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
hugocostadev
marked this pull request as ready for review
August 8, 2022 14:10
filipemarins
approved these changes
Aug 16, 2022
csuadev
pushed a commit
that referenced
this pull request
Aug 26, 2022
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes (including videos or screenshots)
As proposed, was added a fallback component to catch errors at Engagement Dashboard widgets individually.
It used an Error boundary to catch
react-queryerrors, due to this scenario was necessary to install and use the library react-error-boundary that implements everything and more compared to our ErrorBoundary component, the main reason was to capture Query errors and the implementation withreact-querylibrary.New layout:
Before:

After:

Issue(s)
Steps to test or reproduce
1 - Login as an Admin in an Enterprise Edition Rocket.chat
2 - Go to administration > Engagement Dashboard
3 - Simulate an error direct in the code or with the browser Network tab
4 - You should be able to see the fallback component and a button to refetch the query
Further comments
TODO:
Jira: TC-129