Page MenuHomePhabricator

Implement UI for viewing list revision history, content diffs, and patrolling actions
Closed, ResolvedPublic

Description

We currently have a tools history page that can be accessed with URL path that looks like this "/tools/<tool name>/history". Accessing this URL leads to a page where you can view the revision history of the tool, view diff of the various revisions and take patrolling actions like undo and revert.
There is a need to implement a feature with similar functionalities as the tool history page, but this time for tools list.
Just like we access the tool history with "/tools/<tool name>/history", we need a feature that allows us to access tools list history by visiting the URL path "/lists/<id>/history".

User story

As a Toolhub user, I want to view a list's revision history in the same way that this is currently possible for tools so that I can see what changes have been made during the list's existence and take action if needed.

Acceptance criteria

  • There should be a “View history” button in toolhub.wikimedia.org/lists/{list-id}
  • When the “View history” button is clicked, it should lead to /lists/{list-id}/history
  • /lists/{list-id}/history should contain the following elements:
  • The title “List history”
  • The text “view history for this list”
  • A “back to list info” button
  • A “compare two selected revisions” button, which is inactive unless two revisions are selected
  • A list of revisions with checkboxes, in most-recent-first chronological order
  • The options to “undo” or “revert” each revision
  • Other actions, depending on user permissions?
  • Pagination
  • When a specific revision is clicked, it should lead to /lists/{list-id}/history/revision/{revision-id}
  • /lists/{list-id}/history/revision/{revision-id} should contain the following elements:
  • The text "List revision as of {datetime} by {user} ({revision info})"
  • A “Back to list history button”
  • A view of the list as it looked at that point in its history
  • When the “compare two selected revisions” button is clicked, it should lead to /lists/{list-id}/history/revision/{revision-id}/diff/{other-revision-id}
  • /lists/{list-id}/history/revision/{revision-id}/diff/{other-revision-id} should contain the following elements:
  • The title “Revisions Diff”
  • The text “View difference between revisions of list {list-name}”
  • A “Back to list history button”
  • A split view of the two revisions displaying the diffs, with the most recent revision on the right side
  • Additional criteria
  • New messages should be added to vue/src/assets/locales/i18n/{en,qqq}.json

Event Timeline

bd808 triaged this task as Medium priority.Nov 5 2021, 3:25 PM
bd808 added a subscriber: Raymond_Ndibe.
bd808 raised the priority of this task from Medium to High.Dec 2 2021, 11:07 PM
sdkim subscribed.

Move to the backlog to groom and add criteria.
Still need to validate intentions of the list feature for tool users and maintainers

Briefly assigning this task to myself as I'm in the process of grooming it.

Slst2020 updated the task description. (Show Details)
Slst2020 changed the task status from Open to In Progress.Dec 23 2021, 10:18 AM
Slst2020 changed the status of subtask T298698: Implement UI for viewing content diffs from Open to In Progress.
Slst2020 raised the priority of this task from High to Needs Triage.Jan 11 2022, 11:43 AM
Slst2020 triaged this task as Unbreak Now! priority.
Slst2020 lowered the priority of this task from Unbreak Now! to Needs Triage.
Slst2020 moved this task from Groomed/Ready to In Progress on the Toolhub board.
Slst2020 changed the task status from In Progress to Stalled.Jan 18 2022, 1:28 PM
Slst2020 moved this task from Doing to Paused/Blocked on the User-Slst2020 board.
Slst2020 changed the status of subtask T298697: Implement UI for viewing a list revision from Open to Stalled.
Slst2020 changed the task status from Stalled to In Progress.Jan 24 2022, 1:48 PM
Slst2020 moved this task from Paused/Blocked to Doing on the User-Slst2020 board.
Slst2020 changed the status of subtask T298698: Implement UI for viewing content diffs from Open to In Progress.

Change 751947 had a related patch set uploaded (by Slavina Stefanova; author: Slavina Stefanova):

[wikimedia/toolhub@main] ui: Implement UI for viewing list revision history, diffs and patrolling actions

https://gerrit.wikimedia.org/r/751947

Slst2020 changed the task status from In Progress to Open.Jan 28 2022, 11:31 AM
Slst2020 changed the status of subtask T298698: Implement UI for viewing content diffs from In Progress to Open.
Slst2020 moved this task from Doing to Done on the User-Slst2020 board.

Any lingering bugs/issues related to this task need to be documented once the feature is merged.

Right now these are:

  • console.log complaining when navigating to /api/lists/{id}/history via the View History" button. Something about i18n and the Banana Formatter being unhappy. Screenshot below. This doesn't happen upon page reload, or when navigating to the page by directly pasting the URL in the browser's navigation bar.
    Screenshot 2022-01-28 at 14.19.18.png (694×685 px, 145 KB)
  • the ordering of the tools in the current version of a list sometimes differs depending on if you are retrieving the list from /api/lists/{list_pk}/revisions/{id}/ or /api/lists/{id}/

-> T300507

  • some edits to the list of tools that modifies the indices of the remaining items in the list result in unexpected behavior of the /api/lists/{list_pk}/revisions/{id}/diff/{other_id}/ endpoint. Example:
    1. Initial list [tool1, tool2, tool3]
    2. Remove tool1 and tool2
    3. Updated list is now [tool3]

The api returns the following operations:

"operations": [
  {
    "op": "remove",
    "path": "/tools/0"
  },
  {
    "op": "remove",
    "path": "/tools/0"
  }
],
  1. Expected behavior:
  "operations": [
    {
      "op": "remove",
      "path": "/tools/0"
    },
    {
      "op": "remove",
      "path": "/tools/1"
    }
  ],
}

-> T300513

Any lingering bugs/issues related to this task need to be documented once the feature is merged.

Right now these are:

  • console.log complaining when navigating to /api/lists/{id}/history via the View History" button. Something about i18n and the Banana Formatter being unhappy. Screenshot below. This doesn't happen upon page reload, or when navigating to the page by directly pasting the URL in the browser's navigation bar.

Fixed by https://gerrit.wikimedia.org/r/c/wikimedia/toolhub/+/751947/4..5/vue/src/views/ListHistory.vue#204

Change 751947 merged by jenkins-bot:

[wikimedia/toolhub@main] ui: list revision history, diffs and patrolling actions

https://gerrit.wikimedia.org/r/751947

Change 770638 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/deployment-charts@master] toolhub: Bump container version to 2022-03-15-002555-production

https://gerrit.wikimedia.org/r/770638

Change 770638 merged by jenkins-bot:

[operations/deployment-charts@master] toolhub: Bump container version to 2022-03-15-002555-production

https://gerrit.wikimedia.org/r/770638