Replace tags/destroy.js.haml file
What does this MR do?
Related to #250834 (closed)
The tags/destroy.js.haml
partial was used to handle removing tags from the tag list, or when viewing a specific tag. This MR removes the partial and replaces with vanilla JS to handle deleting tags.
- Updates the
confirm_modal.vue
component to take an optional submit handler - Updates the confirmation from an
window.confirm
to use our confirmation modal component - Adds a shared partial for the remove tag button
- Updates related rspec tests
I opted to use vanilla JS as these 2 pages do not currently use vue and so this would be a more iterative step than converting the tag list and tag view pages to vue components.
Screenshots
The only visual changes are to the delete confirmation modal
Before | After |
---|---|
Testing
From the tag list
- Navigate to the tag list for a project ie
/twitter/typeahead-js/-/tags
- Click the bin icon next to any tag
- When the delete confirmation modal appears, click
Delete tag
- The tag is removed from the list
From a specific tag
- Navigate to a tag for a project ie
/twitter/typeahead-js/-/tags/:some-tag-name
- Click the bin icon
- When the delete confirmation modal appears, click
Delete tag
- You will be redirected to the tag list, and the tag will not appear
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Ezekiel Kigbo