-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Confirmation Modal - show warning message when nothing has been changed in modal. #199523
Conversation
…e and entity store switches
…ged, keeping enable button. WiP to add conditional render
...ck/plugins/security_solution/public/entity_analytics/components/entity_store/translations.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't read the original ticket, but wouldn't it be simpler to disable the enablement button?
It also might look weird to show a warning message before any user interaction.
...ck/plugins/security_solution/public/entity_analytics/components/entity_store/translations.ts
Outdated
Show resolved
Hide resolved
...ity_solution/public/entity_analytics/components/entity_store/components/enablement_modal.tsx
Show resolved
Hide resolved
...ity_solution/public/entity_analytics/components/entity_store/components/enablement_modal.tsx
Outdated
Show resolved
Hide resolved
0adcd5d
to
54e0a9f
Compare
(useEntityEnginePrivileges as jest.Mock).mockReturnValue({ | ||
data: { | ||
privileges: { | ||
elasticsearch: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not completely 100% on the contents of this required for the test
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @CAWilson94 |
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11803361684 |
…ed in modal. (elastic#199523) (cherry picked from commit 5d0b62c)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
… changed in modal. (#199523) (#199858) # Backport This will backport the following commits from `main` to `8.x`: - [Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)](#199523) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Charlotte Alexandra Wilson","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T18:21:50Z","message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","v8.16.0","backport:version","v8.17.0"],"title":"Confirmation Modal - show warning message when nothing has been changed in modal. ","number":199523,"url":"https://github.com/elastic/kibana/pull/199523","mergeCommit":{"message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199523","number":199523,"mergeCommit":{"message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Charlotte Alexandra Wilson <[email protected]>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ed in modal. (elastic#199523) (cherry picked from commit 5d0b62c) # Conflicts: # x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/enablement_modal.tsx
…ed in modal. (elastic#199523) (cherry picked from commit 5d0b62c) # Conflicts: # x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/enablement_modal.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ed in modal. (elastic#199523) (cherry picked from commit 5d0b62c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ed in modal. (elastic#199523) (cherry picked from commit 5d0b62c) # Conflicts: # x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/components/enablement_modal.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…n changed in modal. (#199523) (#200691) # Backport This will backport the following commits from `main` to `8.16`: - [Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)](#199523) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Charlotte Alexandra Wilson","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T18:21:50Z","message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","v8.16.0","backport:version","v8.17.0"],"number":199523,"url":"https://github.com/elastic/kibana/pull/199523","mergeCommit":{"message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199523","number":199523,"mergeCommit":{"message":"Confirmation Modal - show warning message when nothing has been changed in modal. (#199523)","sha":"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/199858","number":199858,"state":"MERGED","mergeCommit":{"sha":"079c2269714073af316e501ec5fb2d8442e76620","message":"[8.x] Confirmation Modal - show warning message when nothing has been changed in modal. (#199523) (#199858)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [Confirmation Modal - show warning message when nothing has been\nchanged in modal.\n(#199523)](https://github.com/elastic/kibana/pull/199523)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Charlotte Alexandra\nWilson\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-12T18:21:50Z\",\"message\":\"Confirmation\nModal - show warning message when nothing has been changed in modal.\n(#199523)\",\"sha\":\"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:\nSecuritySolution\",\"Theme: entity_analytics\",\"Feature:Entity\nAnalytics\",\"Team:Entity\nAnalytics\",\"v8.16.0\",\"backport:version\",\"v8.17.0\"],\"title\":\"Confirmation\nModal - show warning message when nothing has been changed in modal.\n\",\"number\":199523,\"url\":\"https://github.com/elastic/kibana/pull/199523\",\"mergeCommit\":{\"message\":\"Confirmation\nModal - show warning message when nothing has been changed in modal.\n(#199523)\",\"sha\":\"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\",\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/199523\",\"number\":199523,\"mergeCommit\":{\"message\":\"Confirmation\nModal - show warning message when nothing has been changed in modal.\n(#199523)\",\"sha\":\"5d0b62ce9eb19a23cc8abfd6506be3f0f687ee80\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.x\",\"label\":\"v8.17.0\",\"branchLabelMappingKey\":\"^v8.17.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by: Charlotte Alexandra Wilson <[email protected]>"}}]}] BACKPORT-->
This PR didn't make it into the latest BC of v8.16.1. Updating the labels. |
Summary
This PR adds a warning message when nothing is selected in the confirmation modal and disables the enable button in that case.
Both features have been combined to enhance accessibility, including an aria label for screen readers to recognise the disabled button and the clear warning message for contextual feedback.
Checklist
Screen.Recording.2024-11-11.at.14.30.05.mov