Skip to content

WIP: Removes UJS actions from Pipelines table

Filipa Lacerda requested to merge 20450-fix-ujs-actions-part-3 into master

What does this MR do?

This MR is a merge of several small MR:

Changes:

  • Create a store and a service to match architectural decisions
  • Divide each button into a component to allow managing state easily
  • Transform UJS actions into buttons
  • Adds tests for new components
  • Adds needed changes to use new components
  • Adds event hub to allow refreshing the table after a request is made when a button is clicked:
  • Removes components from global namespace
  • Removes the use of IIFEs
  • Uses the same store and service for all pipelines tables.

Why was this MR needed?

In order to remove UJS actions in a maintainable way we needed to follow the service-store-components pattern we've been following for all Vue.js features. We need to remove UJS actions because:

  1. they are technical debt from a JS point of view
  2. they were causing several bugs

Screenshots (if relevant)

When a user clicks a button in the pipelines table, it will no longer be redirected to a new page. Instead, the button will show a loader while the request is being made. When the request is successful we will refresh the data in the table to match the new update state.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #20450 (closed) Closes #28535 (closed) Closes #5580 (closed)

Merge request reports