Problem/Motivation

For long forms where revisions are more than 5 or on a Mobile device where screens are narrow and small, users need to scroll all the way down to find the "Compare Revisions" button.

This feature was in D7 version of the module.

Steps to reproduce

Add 5 or 10 revisions based on your screen size and open the compare revision tab you won't see the button on the screen area until you scroll down.

Proposed resolution

- Extract button render array in an array
- Add button before table header array with condition of > 5 with name "submit_top"
- Refactor existing button with above extracted variable

Remaining tasks

None

User interface changes

Two "Compare Selected Revision" buttons on top and bottom.

API changes

None

Data model changes

None

Issue fork diff-3183380

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amjad1233 created an issue. See original summary.

amjad1233’s picture

StatusFileSize
new1.61 KB

Created a fork of this branch.

Traditional patch as attached.

amjad1233’s picture

Status: Active » Needs review
smulvih2’s picture

Status: Needs review » Reviewed & tested by the community

This is a nice improvement for nodes with lots of revisions, works great for me!

bluegeek9’s picture

+1 for RTBC

uqjhawk3’s picture

Assigned: amjad1233 » Unassigned
Status: Reviewed & tested by the community » Needs work
Issue tags: +DrupalSouth

Verified this works on diff 8.x-1.1 against 10.1.x-dev

We could add coverage for this, perhaps in \Drupal\Tests\diff\Functional\DiffRevisionTest::testRevisionDiffOverview

Otherwise RTBC +1

uqjhawk3’s picture

Issue tags: +Needs tests
berliner’s picture

Status: Needs work » Needs review
StatusFileSize
new5.21 KB
new4.41 KB

Updated patch with minor improvements and added tests.

plopesc’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Patch still applies and we have been using it in production sites for a while.

Would be great to have it merged.

Marking as RTBC.

roaldnel’s picture

We have also been using this in production for a while. Can this please be merged? Thanks!

acbramley’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the work on this one. I've recently taken up maintainership of this project and am looking through the RTBC issues.

This fix looks good.

To get this in, I'll need the MR rebased against the latest 8.x-1.x code.

Thanks!

Arantxio made their first commit to this issue’s fork.

arantxio’s picture

Status: Needs work » Needs review

I've merged the branch with the latest changes from 8.x-1.x.

I have tested this on one of our sites and it still seems to be working.

berliner’s picture

I have updated the MR with the patch and a minor correction for backwards compatibility.

I'll also add a patch file that works for 8.x-1.3.

silvi.addweb’s picture

Status: Needs review » Reviewed & tested by the community

I've test the patch and it works for me.

acbramley’s picture

Status: Reviewed & tested by the community » Needs work

Added some feedback.

Liam Morland made their first commit to this issue’s fork.

liam morland’s picture

Status: Needs work » Needs review
StatusFileSize
new4.29 KB

I have rebased the merge request. All feedback changes have been included. This patch is the current state.

  • acbramley committed a7919c4d on 8.x-1.x authored by amjad1233
    Issue #3183380 by berliner, amjad1233, Liam Morland, acbramley: Add "...
acbramley’s picture

Status: Needs review » Fixed

Thanks! Committed to 8.x-1.x.

  • acbramley committed a7919c4d on 2.x authored by amjad1233
    Issue #3183380 by berliner, amjad1233, Liam Morland, acbramley: Add "...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.