Skip to content

[NEW] Fallback Error component for Engagement Dashboard widgets - #26441

Merged
kodiakhq[bot] merged 18 commits into
developfrom
feat/fallback-engagement-dashboard
Aug 17, 2022
Merged

kodiakhq[bot] merged 18 commits into
developfrom
feat/fallback-engagement-dashboard

Conversation

@hugocostadev

@hugocostadev hugocostadev commented Aug 2, 2022 •

Copy link
Copy Markdown
Contributor

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-query errors, 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 with react-query library.

New layout:

Before:
image

After:
image

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:

  • Add e2e tests to engagement dashboard page/widgets to simulate an error and refetch the query (The e2e tests were removed to due an issue to test EE features)
  • Remove old ErrorBoundary component and replace with the new library react-error-boundary

Jira: TC-129

@codecov

codecov Bot commented Aug 2, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #26441 (32beca4) into develop (fe26bce) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head 32beca4 differs from pull request most recent head c5171b8. Consider uploading reports for the commit c5171b8 to get more accurate results

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 38.50% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@hugocostadev
hugocostadev marked this pull request as ready for review August 8, 2022 14:10
@hugocostadev
hugocostadev requested review from a team as code owners August 8, 2022 14:10
@gabriellsh gabriellsh added this to the 5.1.0 milestone Aug 17, 2022
@ggazzo ggazzo added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Aug 17, 2022
@kodiakhq
kodiakhq Bot merged commit 3039f2e into develop Aug 17, 2022
@kodiakhq
kodiakhq Bot deleted the feat/fallback-engagement-dashboard branch August 17, 2022 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants