Show toast after successful lock/unlock of a file
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Show a toast message after successful lock/unlock of a file from the blob overflow menu.
Move the this.locked
state assignment to the success callback to avoid wrong value being set when the toggle API fails with an error.
References
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Checkout to the branch
525062-file-lock-toast
and start the gdk - Open any file such as
https://127.0.0.1:3000/gitlab-org/gitlab-test/-/blob/master/Gemfile.zip
- Click the more button on the right of the
Edit
button - From the overflow menu click on the
Lock
orUnlock
menu depending on the current state of the file - On the confirmation modal click
Lock
/Unlock
- You should see a toast message at the bottom left for locked/unlocked file
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #525062 (closed)
Edited by Ashwin Rai