Problem/Motivation

Just as node/%node is a parent item for view, edit, delete so should node/%node/revisions/% be the parent for view, revert, delete.
Currently, you need to revert from the revision list page, where you only have the date to know whether it's the revision that you actually want to switch to.

Proposed resolution

Show revision actions on view revision page.

Remaining tasks

1. Get UX opinion.
2. Ifusing actions, rename issue title.

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Reroll the patch if it no longer applies. Instructions
Update the issue summary Instructions
Update the issue summary noting if allowed during the beta Instructions

User interface changes

Adds a revert, and delete button to the current revision.

API changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it's needed for usability.
Issue priority Normal.
Unfrozen changes Unfrozen because it only adds buttons to make reverting to a version more convenient.
Prioritized changes The main goal of this issue is usability.
Disruption Seems to be isolated to revisions.

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
StatusFileSize
new1.71 KB
boombatower’s picture

Not sure if delete should be included since it isn't for node/%node/delete.

brianV’s picture

StatusFileSize
new1.44 KB

Re-rolled against current head. I left delete included, although I agree that it's removal should be considered for consistency.

brianV’s picture

StatusFileSize
new1.51 KB

re-rolled with bugfix.

brianV’s picture

StatusFileSize
new1.52 KB

Here's another option for consideration - rather than making the revisions actions local tasks, I put them as local actions.

Status: Needs review » Needs work

The last submitted patch, 1108888-node-revisions-rev4.patch, failed testing.

brianV’s picture

Status: Needs work » Needs review

#4: 1108888-node-revisions-rev3.patch queued for re-testing.

brianV’s picture

#5: 1108888-node-revisions-rev4.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1108888-node-revisions-rev4.patch, failed testing.

brianV’s picture

Status: Needs work » Needs review

#4: 1108888-node-revisions-rev3.patch queued for re-testing.

brianV’s picture

#5: 1108888-node-revisions-rev4.patch queued for re-testing.

yesct’s picture

#5: 1108888-node-revisions-rev4.patch queued for re-testing.

welly’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies correctly.

welly’s picture

#5: 1108888-node-revisions-rev4.patch queued for re-testing.

webchick’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs screenshots

Hm, can someone take a screenshot of what this does? I can't quite parse it from the description, nor from reading the code.

petercook’s picture

StatusFileSize
new12.44 KB
new1.51 KB

Changed two cases of MENU_LOCAL_ACTION in patch to MENU_LOCAL_TASK
Shorter tab labels would be good with hover over for extra description.

Status: Needs review » Needs work

The last submitted patch, node_revisions-1108888-16.patch, failed testing.

rooby’s picture

Here are before and after shots:

Before:
drupal-node_rev_local_tasks_before-110888.png

After the patch in #4:
drupal-node_rev_local_tasks_after_comment_4-110888.png

After the patch in #5:
drupal-node_rev_local_tasks_after_comment_5-110888.png

After the patch in #16:
drupal-node_rev_local_tasks_after_comment_16-110888.png

After seeing these images, a quick comparison of the patches in #4 & #16 indicates that #16 is a re-roll of #4.

mradcliffe’s picture

Status: Needs review » Needs work

Reverting to needs work as the patch fails tests, and it may need a re-roll.

Thank you for the screenshots, rooby.

rooby’s picture

So what is the desired appraoch, actions (#5) or tabs (#16)?

Seems to me that actions makes more sense, because the labels describe actions.

mrded’s picture

Assigned: boombatower » mrded
mrded’s picture

Status: Needs work » Needs review
StatusFileSize
new2.32 KB
new1.44 KB

Take a look new patch, it should works fine.

rbayliss’s picture

The patch applies now, but I'm getting the following Exception after creating a node:

Symfony\Component\Routing\Exception\ResourceNotFoundException: The route for '/node/1/revisions//revert' could not be found in Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest()

Commenting out the revert and delete hook_menu entries makes this go away, so it is breaking on building the local tasks. I'll leave at needs review for the moment we can get the testbot error log.

Status: Needs review » Needs work

The last submitted patch, node-1108888-22.patch, failed testing.

mrded’s picture

Status: Needs work » Needs review
StatusFileSize
new422 bytes
new1.99 KB

This version should be better.

rbayliss’s picture

Patch applies, and the tabs look good. One problem is that when you go to node/{NID}/view or node/{NID}/revisions/{VID}/view, you get a page not found. I think there will need to be a way to deal with menu default local tasks in routes, but that problem is not introduced by this patch.

mrded’s picture

StatusFileSize
new946 bytes
new2.17 KB

I've added description and made title more obvious.

Status: Needs review » Needs work

The last submitted patch, node-1108888-26.patch, failed testing.

rooby’s picture

We still need to agree on the outcome of #20.

I feel actions are more logical.

mrded’s picture

I don't see a reason to show 'MENU_LOCAL_ACTION' without any 'MENU_LOCAL_TASK', and it looks strange.
What's why, I vote for 'MENU_LOCAL_TASK'.

rocketeerbkw’s picture

It was mentioned in #2270717: There is no way to get back from viewing an old node revision that tasks and actions could be used in these ways:

View current | Revisions
<< Previous | Revision 1196 | Revert to this | Delete this | Next >>

View current | View draft | Edit draft | Revisions
<< Prev | Revision 1196 | Revert to this | Delete this | Next >>

yesct’s picture

Assigned: mrded » Unassigned
Issue summary: View changes
Issue tags: +Needs issue summary update, +Needs reroll

It's been a long time. unassigning so it is clear anyone can work on this.

it's a normal task, we should see if it can be done during the beta. adding the instructions for beta evaluation to the summary.

rooby’s picture

Again, we still need a consensus on #20

My vote is for actions instead of tabs because deleting and reverting are actions.

lokapujya’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update, -Needs reroll
StatusFileSize
new616 bytes

Add the actions. I think you can get back to the current revision by clicking the title.

lokapujya’s picture

Issue summary: View changes
lokapujya’s picture

lokapujya’s picture

Title: Make node/%node/revisions/%/* local tasks » Add actions and/or tabs to a node's revision view
johnpitcairn’s picture

Getting back to the current revision by clicking the title may work, but that is likely to be rather non-obvious to the average user, isn't it? I'd advocate an obvious link for that...

Bojhan’s picture

Status: Needs review » Closed (won't fix)
Issue tags: -Needs usability review

Nope, this violates our guidelines http://drupal.org/ui-standards

rooby’s picture

@Bojhan:

Any chance of getting some more specifics on the parts of the guideline that this doesn't align with?

Do you mean that neither option (tabs or actions) are valid within the guideline?

Since the way this currently works is (IMO) not very user friendly I have to wonder a little why we have UI standards that don't allow making something more user friendly.