From 9127a7d9b9c5529d9cc8da1fa5a3f210804400e8 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 19 Aug 2026 11:09:56 -0400 Subject: [PATCH 1/2] MM-69835 Update React Bootstrap to support React 19 (#37758) * Update RB to latest version of fork * Update most snapshots to remove extraneous div * Forward ref to menu passed to RB Dropdown * Update unusual tests broken by RB update * Patch react-overlays to still close modal when default prevented The old version of react-overlays that we had ignored this, but the newer version causes the modal to not close when preventDefault is called on the escape keyboard event. React Select always does that and some other components like the SuggestionBox sometimes prevent default, and it doesn't seem like Floating UI or MUI look at preventDefault to know whether or not to close the modal, so I think React Overlays is the correct place for this patch. * Remove @types/react-overlays in favour of built-in definitions * Update RB to merged commit --- webapp/channels/package.json | 5 +- .../get_link_modal.test.tsx.snap | 534 ++- .../__snapshots__/list_modal.test.tsx.snap | 314 +- .../post_deleted_modal.test.tsx.snap | 101 +- .../add_groups_to_channel_modal.test.tsx.snap | 255 +- .../add_groups_to_team_modal.test.tsx.snap | 255 +- .../add_user_to_channel_modal.test.tsx.snap | 127 +- .../add_users_to_group_modal.test.tsx.snap | 253 +- .../add_users_to_team_modal.test.tsx.snap | 255 +- .../manage_teams_modal.test.tsx.snap | 117 +- .../manage_tokens_modal.test.tsx.snap | 627 ++-- .../add_users_to_role_modal.test.tsx.snap | 1265 ++++--- .../group_members_modal.test.tsx.snap | 177 +- .../apps_form_container.test.tsx.snap | 379 +-- .../browse_channels.test.tsx.snap | 578 ++-- .../channel_members_modal.test.tsx.snap | 244 +- .../delete_channel_modal.test.tsx.snap | 133 +- .../delete_post_modal.test.tsx.snap | 345 +- .../edit_channel_header_modal.test.tsx.snap | 1453 ++++---- .../get_public_link_modal.test.tsx.snap | 278 +- .../keyboard_shortcuts_modal.test.tsx.snap | 2614 +++++++------- .../learn_more_trial_modal.test.tsx.snap | 2028 ++++++----- .../leave_channel_modal.test.tsx.snap | 288 +- .../leave_team_modal.test.tsx.snap | 89 +- .../more_direct_channels.test.tsx.snap | 606 ++-- .../marketplace_modal.test.tsx.snap | 2092 ++++++------ .../marketplace_modal.test.tsx | 148 +- .../product_notices.test.tsx.snap | 568 ++-- .../removed_from_channel_modal.test.tsx.snap | 109 +- .../request_join_channel_modal.test.tsx | 25 +- .../reset_status_modal.test.tsx.snap | 288 +- .../start_trial_form_modal.test.tsx.snap | 485 ++- .../team_members_modal.test.tsx.snap | 258 +- .../trial_benefits_modal.test.tsx.snap | 3010 ++++++++--------- .../unarchive_channel_modal.test.tsx.snap | 123 +- .../update_user_group_modal.test.tsx.snap | 223 +- .../user_groups_modal.test.tsx.snap | 1046 +++--- .../view_user_group_modal.test.tsx.snap | 317 +- .../__snapshots__/submenu_modal.test.tsx.snap | 219 +- .../channel_header_plug.tsx | 56 +- webapp/package-lock.json | 119 +- webapp/patches/react-overlays+5.2.1.patch | 30 + webapp/platform/components/package.json | 4 +- .../__snapshots__/generic_modal.test.tsx.snap | 92 +- 44 files changed, 11261 insertions(+), 11271 deletions(-) create mode 100644 webapp/patches/react-overlays+5.2.1.patch diff --git a/webapp/channels/package.json b/webapp/channels/package.json index fc08df1aba03..b53b255ec243 100644 --- a/webapp/channels/package.json +++ b/webapp/channels/package.json @@ -75,13 +75,13 @@ "prop-types": "15.8.1", "react": "18.2.0", "react-beautiful-dnd": "13.1.1", - "react-bootstrap": "github:mattermost/react-bootstrap#05559f4c61c5a314783c390d2d82906ee8c7e558", + "react-bootstrap": "github:mattermost/react-bootstrap#c17701564a6f240a14419d94369936c380f917e5", "react-color": "2.19.3", "react-day-picker": "8.3.6", "react-dom": "18.2.0", "react-intl": "*", "react-is": "18.2.0", - "react-overlays": "0.9.3", + "react-overlays": "5.2.1", "react-redux": "9.2.0", "react-router-dom": "5.3.4", "react-select": "5.9.0", @@ -129,7 +129,6 @@ "@types/react-bootstrap": "0.32.35", "@types/react-color": "3.0.6", "@types/react-dom": "18.2.25", - "@types/react-overlays": "1.1.3", "@types/react-router-dom": "5.3.3", "@types/react-transition-group": "4.4.5", "@types/react-virtualized-auto-sizer": "1.0.1", diff --git a/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap b/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap index d4a06f09d104..98b23902937d 100644 --- a/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap +++ b/webapp/channels/src/components/__snapshots__/get_link_modal.test.tsx.snap @@ -9,85 +9,82 @@ exports[`components/GetLinkModal should have called onHide when close button is aria-hidden="true" />