Page MenuHomePhabricator

Show file sizes for images, vector graphics and videos
Closed, ResolvedPublic2 Story Points

Description

When choosing a file type in the interface, we offer a drop down that lists size options. Currently, the size options are only shown for some image types. The file types where the size options should be shown are image, drawing, and video. They should be shown both for the general file types and specific file extensions (e.g. png and svg don't)

Event Timeline

gabriel-wmde moved this task from Backlog to Doing (others) on the Advanced-Search board.

We had discussed that excluding certain Image formats from showing the selectors should be avoided since it would require to hard-code that. @gabriel-wmde is that correct?
We're only talking about the image formats here, not the general file type.

The options at hand were:

  1. Make them appear for all image formats
  2. Make them appear for none of the image formats

Specifying a height/width for SVGs seems to work (at least in the sense as there are different results):

I've looked throuh the first 100 entries of SVGs and saw that they all have width/height.

If this is the case, and it doesn't break the search, then I am all for showing the selectors for all image formats, rather than for none.

I've read the description 3x and the comment 1x and still don't know what actually needs doing. From the description I understand that currently the options are only shown for some image formats. Then the description says they should be shown for specific formats (no idea how that is different from the current situation), while the comment says they either need to be shown for all or for none. So that all adds up to "something needs to happen related to showing the file size options"...

@JeroenDeDauw as far as I can see only Image and Video in the General file type section trigger the file size options while Image formats png and jpg don't trigger this. Since we can't just have some of the image formats trigger the sizing and others don't we decided to go forward with having all the image formats trigger it.

Does that help?

gabriel-wmde moved this task from Todo to Doing on the WMDE-Fundraising-Sprint-12 board.

Change 382679 had a related patch set uploaded (by Gabriel Birke; owner: Gabriel Birke):
[mediawiki/extensions/AdvancedSearch@master] Support dimensions for images and videos

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

gabriel-wmde removed gabriel-wmde as the assignee of this task.Oct 6 2017, 10:31 AM
gabriel-wmde moved this task from Doing to Review on the WMDE-Fundraising-Sprint-12 board.
Pablo-WMDE removed Pablo-WMDE as the assignee of this task.Oct 6 2017, 12:07 PM

Change 382679 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Support dimensions for images and videos

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

This is now deployed and can be tested

Hey, thanks for the ping!

Looks good to me :)

I have one question which is kinda related:

the tab created for a search like that has a path

would it be possible to remove that to just display filetype: png and if yes should that go into an extra ticket or is it like a two second fix?

Hi @Charlie_WMDE,
nice spot. What you see ("path") is the mime type the search is actually performed for - not the file extension we are used to from user interfaces (e.g. both ".jpg" and ".jpeg" are found for "image/jpeg").
But you are right, this is something we should probably change. I think it may have actually been introduced during T170402.
The component rendering the previews does have a rather convenient extension point for that.
/cc @Lea_WMDE

Charlie_WMDE added a comment.EditedNov 2 2017, 3:33 PM

thanks @Lea_WMDE and @Pablo-WMDE

this ticket can probably be closed then, right?

Lea_WMDE closed this task as Resolved.Nov 7 2017, 12:38 PM
Lea_WMDE claimed this task.