HomePhabricator

Support URLs as item ID inputs

Description

Support URLs as item ID inputs

Allow users to paste various URLs into the item ID input and try to
parse the ID out of them, for convenience.

The parsed URL behavior of picking the *last* title from the URL
(query.get('title', [''])[-1]) is meant to match MediaWiki, since that
seems to do the same: www.wikidata.org/w/index.php?title=Q1&title=Q2
shows Q2, not Q1.

“Item ID” is really a misnomer here, because we also support properties,
lexemes, senses and forms (as shown by the previous pattern in the
HTML). However, I don’t have a good alternative term to use here (it
can’t be “entity” because it should not include MediaInfo entities,
which we handle differently), so we leave it at “item” for now. I
suspect, but haven’t thoroughly checked, that most if not all other uses
of the term “item” in the tool also really mean “non-MediaInfo entity”.

Details

Provenance
LucasWerkmeisterAuthored on May 20 2022, 12:08 PM
Parents
R2422:010a68cafe3f: Make image height less than full viewport height
Branches
Unknown
Tags
Unknown
ChangeId
None