Add toast when variable actions/mutations succeed
What does this MR do and why?
For #392948 (closed)
This MR adds a toast that shows when a variable was successfully added/updated/deleted.
Why?: This makes it easier to know whether actions taken on variables succeeded. Also, the variables list will no longer show all variables at once with the ci_variables_pages
feature flag enabled, so it will become even less clear whether actions succeeded unless we add this feedback.
Screenshots or screen recordings
page | screen recording |
---|---|
project settings | Screen_Recording_2023-03-28_at_17.25.45 |
group settings | Screen_Recording_2023-03-28_at_17.26.57 |
admin area | Screen_Recording_2023-03-28_at_17.28.37 |
Note
The way this is currently written, the updated toast is still shown even if the variable wasn't changed in any way:
Screen_Recording_2023-03-28_at_17.31.50
This behavior could be changed - I'm not sure if it feels confusing or reassuring, and I don't know of any examples like this to check in the existing codebase
How to set up and validate locally
git checkout 392948-add-toast-on-variable-change
- navigate to a project
- in the sidebar select
Settings
=>CI/CD
- expand the
Variables
settings section - add a variable - a toast should be shown
- update a variable - a toast should be shown
- delete a variable - a toast should be shown
- navigate to a group, then repeat steps
3.
-7.
- navigate to the admin area, then repeat steps
3.
-7.
To run tests
yarn install && yarn jest variable
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.