-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
fix: add withErrorBoundary
to BannerRegion
#33689
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: b173fb2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #33689 +/- ##
========================================
Coverage 74.97% 74.97%
========================================
Files 480 480
Lines 21021 21021
Branches 5335 5335
========================================
Hits 15760 15760
Misses 4632 4632
Partials 629 629
Flags with carried forward coverage won't be shown. Click here to find out more. |
Please see my comment here with bad DB entries:
https://open.rocket.chat/channel/support?msg=7yCNx7QBzzxwmDZ5M |
SUP-634
Proposed changes (including videos or screenshots)
Adds an
ErrorBoundary
to theBannerRegion
preventing the banner from breaking the whole ui. Doing this as we cannot always trust the payload to the BannerIssue(s)
Closes #33263
Steps to test or reproduce
To reproduce this you need to have a banner with an invalid property type:
{ "_id": "67117d75a495ea0a131a2a54", "_updatedAt": { "$date": "2024-10-18T21:52:17.653Z" }, "active": true, "createdAt": { "$date": "2024-10-17T21:11:17.475Z" }, "createdBy": "cloud", "expireAt": { "$date": "2024-10-19T21:11:17.475Z" }, "platform": [ "web", "mobile" ], "roles": [ "admin" ], "selector": { "roles": [ "admin" ] }, "startAt": { "$date": "2024-10-17T21:11:17.475Z" }, "surface": "banner", "view": { "variant": "warning", "viewId": "67117d75a495ea0a131a2a54", "appId": "cloud-announcements-core", "title": {}, "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "**Omnichannel social channels, desktop and mobile apps will stop working in 15 days.**" } }, { "type": "section", "text": { "type": "plain_text", "text": "Please update to supported workspace version. Learn more" } }, { "type": "section", "text": { "type": "mrkdwn", "text": "[more information](https://go.rocket.chat/i/supported-versions)" } } ] } }
in this case, the title was being sent as
{}
Further comments