Skip to content
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

Merged
merged 3 commits into from
Oct 21, 2024
Merged

fix: add withErrorBoundary to BannerRegion #33689

merged 3 commits into from
Oct 21, 2024

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented Oct 21, 2024

SUP-634

Proposed changes (including videos or screenshots)

Adds an ErrorBoundary to the BannerRegion preventing the banner from breaking the whole ui. Doing this as we cannot always trust the payload to the Banner

Issue(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

Copy link
Contributor

dionisio-bot bot commented Oct 21, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.1.0, but it targets 7.0.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: b173fb2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

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

Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33689/
on branch gh-pages at 2024-10-21 16:39 UTC

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.97%. Comparing base (70f5730) to head (b173fb2).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           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           
Flag Coverage Δ
unit 74.97% <ø> (ø)

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

@MartinSchoeler MartinSchoeler marked this pull request as ready for review October 21, 2024 17:09
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner October 21, 2024 17:09
@aleksandernsilva aleksandernsilva added this to the 7.1.0 milestone Oct 21, 2024
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Oct 21, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 21, 2024
@kodiakhq kodiakhq bot merged commit dc457ac into develop Oct 21, 2024
51 checks passed
@kodiakhq kodiakhq bot deleted the banner-break branch October 21, 2024 19:14
@reetp
Copy link

reetp commented Oct 22, 2024

Please see my comment here with bad DB entries:

    "expireAt" : ISODate("+275760-09-13T00:00:00.000+0000"),
    "startAt" : ISODate("2023-11-16T10:06:08.975+0000"),
    "createdAt" : ISODate("2023-11-16T10:06:08.975+0000"),
    "_updatedAt" : ISODate("2023-11-16T10:06:08.975+0000")

https://open.rocket.chat/channel/support?msg=7yCNx7QBzzxwmDZ5M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"The application GUI just crashed" - after dismissing banner
5 participants