Remove UJS actions from pipelines tables
What does this MR do?
This MR is a merge of several small MR:
- Step 1: Create a store and a service. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9853
- Step 2: Divide buttons into components https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9855
- Step 3: Add event hub to allow refresh the table https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9866
- Step 4: Remove IIFE and global namespace https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9868
- Step 5: Reuse the store and service of step 1 in all pipelines tables https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9869
- Improves coverage of Pipelines JS code.
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:
- they are technical debt from a JS point of view
- 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?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #20450 (closed) Closes #28535 (closed) Closes #5580 (closed)