Page MenuHomePhabricator

[M] Make filter URL query param match the search keywords
Closed, ResolvedPublic

Description

MediaSearch's filters mimeType, imageSize & license map directly to Cirrus search keywords filemime, fileres and haslicense.
I suggest we simply use the same keywords:

  • it saves some code & complexity from mapping one thing to another and back
  • it's more straightforward for those who know and use these keywords already

Note: I think it'd also make sense to map type to filetype, although that one's slightly special because - for the categories&pages tab - it doesn't map to a cirrus keyword, but kicks off another type of search altogether. (out of scope for this ticket)

Acceptance criteria:

  • the URL query param for licenses becomes haslicense
  • the URL query param for file types becomes filemime
  • the URL query param for images sizes becomes fileres

Event Timeline

CBogen renamed this task from Make filter URL query param match the search keywords to [M] Make filter URL query param match the search keywords.Feb 24 2021, 5:45 PM
CBogen updated the task description. (Show Details)

Change 668357 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Rename URI to params to their search keyword equivalent

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

Change 668358 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Rename 'bitmap' to 'image'

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

Change 668357 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Rename URI to params to their search keyword equivalent

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

Change 668358 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Rename 'bitmap' to 'image'

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

Checked in commons wmf.35
Special:MediaSearch?type=image&q=tulip&haslicense=unrestricted&filemime=jpeg&fileres=%3E1000

mimeType -> filemime
license -> haslicense
imageSize -> fileres
bitmap -> image