feat: Show a confirmation modal when switching attribute stores#40826
feat: Show a confirmation modal when switching attribute stores#40826KevLehman wants to merge 6 commits into
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: d98549e The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #40826 +/- ##
===========================================
- Coverage 70.21% 70.16% -0.06%
===========================================
Files 3355 3356 +1
Lines 129243 129268 +25
Branches 22393 22390 -3
===========================================
- Hits 90746 90696 -50
- Misses 35203 35286 +83
+ Partials 3294 3286 -8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds a user confirmation step before switching the ABAC attribute store, to prevent accidental irreversible clearing of existing room attribute assignments. It does so by extending the reusable SettingField component with an optional confirmation-modal renderer, and wiring it into the ABAC settings page.
Changes:
- Added new i18n strings for the attribute store switch confirmation modal (title + confirm button).
- Updated ABAC settings page to show a danger
GenericModalbefore applying an attribute store change. - Extended
SettingFieldwith an optionalrenderConfirmModalprop and added unit tests covering confirm/cancel flows.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/i18n/src/locales/en.i18n.json | Adds English strings for the new confirmation modal. |
| apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingsPage.tsx | Wires the attribute store setting to display a confirmation GenericModal. |
| apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.tsx | Adds renderConfirmModal support and modal triggering logic inside onChangeValue. |
| apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.spec.tsx | Adds tests ensuring modal gating works and dispatch only occurs after confirm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
00f40a3 to
00f17a5
Compare
ef81453 to
57c3a34
Compare
…ttings (#40909) Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
Proposed changes (including videos or screenshots)
Issue(s)
https://rocketchat.atlassian.net/browse/ABAC3-21
Steps to test or reproduce
Further comments
We're changing the ABAC settingfield component so it shows a confirmation modal when the setting has an
alertproperty.