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
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | diff-add_compare_revisions-3183380-19.patch | 4.29 KB | liam morland |
| #15 | 3183380-add-compare-revisions-8.x-1.3.patch | 5.19 KB | berliner |
| #9 | interdiff.txt | 4.41 KB | berliner |
| #9 | 3183380-add-compare-revisions-9.patch | 5.21 KB | berliner |
| #3 | 3183380-add-compare-revisions.patch | 1.61 KB | amjad1233 |
Issue fork diff-3183380
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
Comment #3
amjad1233Created a fork of this branch.
Traditional patch as attached.
Comment #4
amjad1233Comment #5
smulvih2This is a nice improvement for nodes with lots of revisions, works great for me!
Comment #6
bluegeek9 commented+1 for RTBC
Comment #7
uqjhawk3 commentedVerified 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::testRevisionDiffOverviewOtherwise RTBC +1
Comment #8
uqjhawk3 commentedComment #9
berliner commentedUpdated patch with minor improvements and added tests.
Comment #10
plopescPatch still applies and we have been using it in production sites for a while.
Would be great to have it merged.
Marking as RTBC.
Comment #11
roaldnel commentedWe have also been using this in production for a while. Can this please be merged? Thanks!
Comment #12
acbramley commentedThanks 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!
Comment #14
arantxioI'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.
Comment #15
berliner commentedI 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.
Comment #16
silvi.addweb commentedI've test the patch and it works for me.
Comment #17
acbramley commentedAdded some feedback.
Comment #19
liam morlandI have rebased the merge request. All feedback changes have been included. This patch is the current state.
Comment #21
acbramley commentedThanks! Committed to 8.x-1.x.