Page MenuHomePhabricator

Make File syntax processing match the specification and documentation
Open, MediumPublic

Description

Brief summary

File: syntax as described at mw:Help:Images is inconsistent and does not work as expected in all cases. Linter fails to identify all problem cases. The "parameters" (for lack of a better word) and options used in the File: syntax do not work in a predictable, consistent way, and their implementation is inconsistent with how template parameters work.

See https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2021/Multimedia_and_Commons/Make_File_syntax_processing_match_the_specification_and_documentation for a full description and links to existing phabricator tasks

Skills required

Programming skills, strong analytical skills to compare the specification with functionality, technical writing of documentation (mentor can help with documentation).

Possible mentor(s)

Jonesey95

Microtasks

(A couple of these have been worked on a little in the past few months, but the whole system still needs a full evaluation.)

T216566: Capitalized versions of valid File options are usually (but not always) ignored, but are (usually but not always) not flagged as Linter bogus file options.
T216003: Linter fails to detect multiple "upright" parameters as a Bogus file option (there are multiple variants within this bug report, including inconsistent handling of spaces before and after equals signs in File: parameters. Note also that if there is a space character between alt and the equals sign, the alt statement will be treated as a caption.)
T215999: Linter does not detect invalid "500px500px" as a bogus file option (also "600 px", "left150px", duplicated "300px")
T179605: LintError bogus-image-options triggers on "Thumbtime" (in general, case sensitivity works inconsistently in File: syntax)
T266406: Linter false positive: "Center/Left/Right" as caption for gallery image (no workaround is available)
T264464: Conflicting border/thumb/frame options are not detected as Linter errors (Until October 2020, mw:Help:Images said "If multiple of these options are present, only the first one will be used". That statement was incorrect, in that some options have priority over others regardless of position, leading to inconsistent results for editors and readers.)
T276675: Image caption ending in "px" is incorrectly detected as a Linter error
T306216: Media options don't have the same whitespace leniency as template arguments

https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2021/Multimedia_and_Commons/Make_File_syntax_processing_match_the_specification_and_documentation

Event Timeline

@Jonesey95 Thank you so much for creating this task! I am one of the org admins for Wikimedia, and I have got a few questions for you:

  • Do you have a sense of how much time it would take an absolute beginner to complete this project?
  • Which programming skills would one require to work on this project?
  • Where would the code contributions ultimately land?
  • Are you going to be a technical or non-technical mentor on the project? Do you have a second mentor in mind with complementary skills?

I would then be able to share with you the next steps :)

I do not have good answers for any of these questions.

With respect to the amount of time this might take, I can only give you factors of ten. It will take well over 10 hours, and well under 1,000 hours. Probably somewhere in the 30 to 200 hour range is a good guess.

I don't know what programming skills would be needed, since I don't know anything about the code that runs Wikimedia sites.

The code contributions would ultimately be incorporated into the file handling branch of the Wikimedia code base, I think.

I am an end user of Wikipedia, so I can act as a QA person to identify bugs (as indicated in the many phab tasks that I have submitted). If there is a spec, I'll be happy to read it with someone to help them understand it. I can find and make test cases.

User @Sbailey (WMF) might be a person who could answer these questions more effectively. They have recently done some work on T215999.

@Jonesey95 Thank you for sharing your response! Scope-wise, this project looks good then. As you are coming with a non-technical background, we would need someone with technical skills willing to collaborate with you on this idea and mentor a candidate via GSoC. Have you talked with a potential technical mentor already, or would you need help in recruiting one?

I would need help recruiting a technical mentor. Thanks!

@Jonesey95 Okay! As a first step, I would encourage you to send an email to Wikitech-l sharing your idea and that you are looking for a mentor for the project.

No thanks. I must have misunderstood the call for submissions. I feel that I have described the work adequately.

In that case I'm afraid this task will not take place, if no technical mentor accidentally stumbles upon this task here.

(removing the tag as we didn't end up featuring this in GSoC)

Boldly declining as it sounds there is no mentor for this.

Sbailey claimed this task.

Not sure why me or Arlo were not pinged to act as a mentor, a year ago, I am just seeing this for the first time. While it may not be suitable as a task for the Outreach program, the issue itself looks like it should be triaged at a minimum and might be something I look into, placing it on my backlog.

Arlolra triaged this task as Medium priority.Aug 22 2023, 8:00 PM
Arlolra added a project: Parsoid.
Arlolra moved this task from Backlog to Parsoid on the MediaWiki-extensions-Linter board.
Arlolra moved this task from Needs Triage to Media Structure on the Parsoid board.