Skip to content

Show toast after successful lock/unlock of a file

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
file-lock-before file-lock-after

How to set up and validate locally

  1. Checkout to the branch 525062-file-lock-toast and start the gdk
  2. Open any file such as https://127.0.0.1:3000/gitlab-org/gitlab-test/-/blob/master/Gemfile.zip
  3. Click the more button on the right of the Edit button
  4. From the overflow menu click on the Lock or Unlock menu depending on the current state of the file
  5. On the confirmation modal click Lock / Unlock
  6. 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

Merge request reports

Loading