Page MenuHomePhabricator

Fixes T4815
Needs ReviewPublic

Authored by fejnartal on Apr 20 2017, 9:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 11:32 PM
Unknown Object (File)
Fri, Apr 19, 6:25 PM
Unknown Object (File)
Mon, Apr 1, 6:10 PM
Unknown Object (File)
Feb 2 2024, 2:49 PM
Unknown Object (File)
Jan 10 2024, 1:26 AM
Unknown Object (File)
Dec 25 2023, 1:13 AM
Unknown Object (File)
Dec 19 2023, 3:42 AM
Unknown Object (File)
Dec 14 2023, 7:40 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Replicated the class PHUIPagerView.php to implement a [Prev][Next] pager
with fixed pageSize=1 and surroundingPages=0.

I had to work around the fact that in Phriction the last version of a Document
can also be referenced as v=0.

This caused the pager to diplay the [Next] button with a link to version=1
when viewing the last version of a wiki Document.

Future improvements:
Currently, the first version of a Document displays the [Prev] button with a link
to the last version. I haven't found any elegant workaround to this behaviour, so I
have left it untouched.

This also causes wiki Documents with only 1 version to display the [Prev] button linked
to itself.

Test Plan

Visit any wiki page with more than 1 versions.
Navigate backward: always using the [Prev] button.
Navigate forward: always using the [Next] button.
Visit a wiki page with only 1 version.

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16621
Build 22163: arc lint + arc unit