Skip to content

feat: Show a confirmation modal when switching attribute stores#40826

Draft
KevLehman wants to merge 6 commits into
developfrom
chore/confirm-modal-store-change
Draft

feat: Show a confirmation modal when switching attribute stores#40826
KevLehman wants to merge 6 commits into
developfrom
chore/confirm-modal-store-change

Conversation

@KevLehman

@KevLehman KevLehman commented Jun 4, 2026

Copy link
Copy Markdown
Member

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 alert property.

@dionisio-bot

dionisio-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d98549e

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

This PR includes changesets to release 16 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/i18n Minor
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/ui-composer Major
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor

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

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f0fef8b-02a7-4b3a-b37a-71bd0e7b928c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.03704% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.16%. Comparing base (a080c80) to head (d98549e).

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 59.20% <37.03%> (-0.12%) ⬇️
e2e-api 47.09% <ø> (-0.07%) ⬇️
unit 70.12% <ø> (-0.04%) ⬇️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GenericModal before applying an attribute store change.
  • Extended SettingField with an optional renderConfirmModal prop 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.

Comment thread apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.tsx Outdated
Comment thread apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.spec.tsx Outdated
Comment thread apps/meteor/client/views/admin/ABAC/ABACSettingTab/SettingField.spec.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@KevLehman KevLehman force-pushed the chore/confirm-modal-store-change branch from 00f40a3 to 00f17a5 Compare June 11, 2026 15:05
@KevLehman KevLehman added this to the 8.6.0 milestone Jun 11, 2026
@KevLehman KevLehman changed the title chore: Show a confirmation modal when switching attribute stores feat: Show a confirmation modal when switching attribute stores Jun 11, 2026
@KevLehman KevLehman force-pushed the chore/confirm-modal-store-change branch from ef81453 to 57c3a34 Compare June 12, 2026 21:49
…ttings (#40909)

Co-authored-by: Kevin  Aleman <kaleman960@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants