Page MenuHomePhabricator

Easy date selection for Special:NewFiles
Closed, ResolvedPublic

Description

Author: le.korrigan

Description:
A user on Commons has recently expressed the need to select a particular date / time to view [[Special:NewFiles]] from. I have told him that the timestamp in the URL could be used to do so, but it isn't a very user-friendly way.

Thus, it would be convenient to be able to select a particular date / time on Special:Newimages (and why not Special:Newpages), a bit like [[Special:Contributions]] does. Thanks.


Version: 1.12.x
Severity: enhancement

Details

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:57 PM
bzimport set Reference to bz11836.
bzimport added a subscriber: Unknown Object (MLST).

chughakshay16 wrote:

Could you give me an example of how timestamp in the URL is used in case of [[Special:NewImages]]. As I have tried with year=&month=, it doesnt seem to work.

Sn1per subscribed.

This can't be too bad

Sn1per renamed this task from Easy date selection for Special:Newimages to Easy date selection for Special:NewFiles.Dec 12 2016, 4:39 PM
Sn1per updated the task description. (Show Details)

Change 326476 had a related patch set uploaded (by Sn1per):
Date range filtering in Special:NewFiles

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

pasted_file (591×540 px, 35 KB)

https://gerrit.wikimedia.org/r/#/c/326459 implements a RangeChronologicalPager that makes it relatively easy to add date range filtering to other pages such as Special:NewFiles.

EDIT: Parser => Pager

Is there a way to modify HTMLForm values? If the start date comes after the end date, I swap them so that the range filters still work, but I haven't been able to figure out a way to apply this change to the values of the two DateTimeInputWidgets without using client-side JS to swap them (which wouldn't work for non-JS users etc.).

or we could avoid the problem entirely by just having the page show an error if start date comes after end date.

Is there a way to modify HTMLForm values? If the start date comes after the end date, I swap them so that the range filters still work, but I haven't been able to figure out a way to apply this change to the values of the two DateTimeInputWidgets without using client-side JS to swap them (which wouldn't work for non-JS users etc.).

I tried to use HTMLForm filtering or validation methods, but those options required a reworking of the Special page logic to work with HTMLForm submission and other things. In the end the client-side interface swap of the date range values is the best solution I can think of. Please let me know if I am incorrect.

Change 326476 merged by jenkins-bot:
[mediawiki/core@master] Date range filtering in Special:NewFiles

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

Sn1per closed this task as Resolved.EditedMay 23 2017, 2:01 PM

The resulting interface looks like this:

pasted_file (591×540 px, 35 KB)

Thanks for working on this! Setting User-notice just in case this is something to potentially put into Tech News