Background: The article list table (T423655) needs a delete action for authorised users. This task adds an Actions column to the table with a Remove button. Clicking Remove shows a confirmation dialog; on confirmation, the DELETE /worklist/{article_id} API (T423656) is called. The row is removed from the DOM on success.
Type of story
- Front end
Acceptance criteria
- An Actions column is added to the worklist article table (T423655).
- Any logged in user (not temp account) can see a Remove button on every row
- Clicking the Remove button opens a confirmation dialog before any API call is made.
- Clicking Cancel in the confirmation dialog closes the dialog without deleting the article.
- Clicking Remove in the confirmation dialog calls the PATCH API endpoint (T423656).
- On successful deletion: the row is removed.
Design
- Design from T422733 is required before implementation.
Messages and copy included
- For happy path:
- Message key: campaignevents-worklist-remove-button-label
- Message text: "Remove"
- Context: label for the Remove button in the Actions column of the worklist article table
- Message key: campaignevents-worklist-remove-confirm-title
- Message text: "Remove page from worklist?"
- Context: title of the confirmation dialog shown before deleting an article from the worklist
- Message key: campaignevents-worklist-remove-confirm-body
- Message text: "This page will be removed from the worklist."
- Context: body text of the confirmation dialog shown before deleting an article from the worklist
- Message key: campaignevents-worklist-remove-confirm-action
- Message text: "Remove"
- Context: label of the destructive primary button that confirms removal in the confirmation dialog
- Message key: campaignevents-worklist-remove-confirm-cancel
- Message text: "Cancel"
- Context: label of the button that dismisses the confirmation dialog without removing the article
- Message key: campaignevents-worklist-remove-success
- Message text: "The page was removed from the worklist."
- Context: success notification shown after an article is successfully removed from the worklist
- Message key: campaignevents-worklist-remove-button-label
- For unhappy path:
- Message key: campaignevents-worklist-remove-error
- Message suggestion: "The page could not be removed from the worklist. $1 ($1 = API error message)"
- Context: error notification shown when the API call fails (mirrors the contributions delete-actions pattern)
- Message key: campaignevents-worklist-remove-error
Are there dependencies (on someone else or learning something new)?
- Design from T422733 must be available before implementation.
Depends on
- T423655 (article list table must exist for the Actions column to be added to it)
- T423656 (DELETE /worklist/{article_id} REST API must exist before the delete flow can call it)
Testing required?
- Yes
- Minimum testing to pass QA:
- Tested end-to-end in: task-11 (this task)
Split patches suggestion
- Branch 1: Actions column
- Branch 2: Confirmation dialog + DELETE API call + row removal (fadeOut) + i18n

