Page MenuHomePhabricator

Make Form ID link targets less redundant
Closed, ResolvedPublic5 Story Points

Description

Problem:
If I want to link to a certain form of a Lexeme in Wikidata, I must use a URL like https://www.wikidata.org/wiki/Lexeme:L1234#L1234-F1, where the Lexeme ID is repeated and separated by a hyphen from the relevant Form ID, F1. https://www.wikidata.org/wiki/Lexeme:L1234#F1 would be more convenient and less redundant.

Example:

BDD
GIVEN a Lexeme L1234
AND a Form F1
WHEN I add #F1 to the URL of the Lexeme
AND load the page
THEN the page jumps to the F1 section of the page

Acceptance criteria:

  • a Form in the Form section of the Lexeme has an HTML ID that is equivalent to the Form's ID

Notes:

  • We don't keep the old IDs.
  • This probably means <div class="wikibase-lexeme-form listview-item wikibase-toolbar-item" id="L1234-F1"> is to be replaced with <div class="wikibase-lexeme-form listview-item wikibase-toolbar-item" id="F1">
  • the HTML id: in FormsView line 105, $this->templateFactory->render( 'wikibase-lexeme-form' ... ) should inject F1 instead of L1-F1
  • the link fragment: in FormTitleStoreLookup line 49

Event Timeline

abian created this task.May 24 2018, 11:46 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 24 2018, 11:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lydia_Pintscher renamed this task from Make form IDs more consistent and less redundant to Make Form ID link targets more consistent and less redundant.May 27 2018, 5:41 PM
Lydia_Pintscher triaged this task as Low priority.

With the latter part do you mean what is shown to the user in the UI of a Lexeme? Changing that from L12345-F1 to F1?

abian added a comment.May 27 2018, 5:58 PM

With the latter part do you mean what is shown to the user in the UI of a Lexeme? Changing that from L12345-F1 to F1?

That's it. However, I wrote that before knowing the RDF ID is already decided and meets the pattern L12345-F1, and it's impossible to be consistent with the URL target, #F1, and the RDF representation, -F1, so the proposed change in the UI may be ignored.

Excellent :) Then I'll remove this here.

abian renamed this task from Make Form ID link targets more consistent and less redundant to Make Form ID link targets less redundant.May 27 2018, 6:08 PM
Vvjjkkii renamed this task from Make Form ID link targets less redundant to edcaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from edcaaaaaaa to Make Form ID link targets less redundant.Jul 2 2018, 1:20 PM
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Jakob_WMDE set the point value for this task to 5.Jul 24 2018, 12:22 PM
Pablo-WMDE updated the task description. (Show Details)Jul 31 2018, 8:44 AM
Jakob_WMDE updated the task description. (Show Details)Aug 8 2018, 10:12 AM

Change 458781 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Make Form ID link targets less redundant

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

Change 458781 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Make Form ID link targets less redundant

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

Change 459534 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Clean up sub-entity id splitting.

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

Change 459537 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Set correct form id in js

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

Change 459534 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Clean up sub-entity id splitting.

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

Change 459537 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Set correct form id in js

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

\o/

This looks good. I also tested Senses and from looking at the HTML https://wikidata.beta.wmflabs.org/wiki/Lexeme:L1#S3 should work but it doesn't. What am I missing? (It's ok to not cover this in this task but I'd like to get to the bottom of why it doesn't work there while it seemingly should so I can open another ticket.)

Addshore moved this task from incoming to in progress on the Wikidata board.Sep 17 2018, 8:19 AM

@Lydia_Pintscher we only did the forms part of this (as it says in the ticket) and didn't touch senses. The anchors for senses still have the L[ID]- prefix, e.g. https://wikidata.beta.wmflabs.org/wiki/Lexeme:L1#L1-S5

abian added a comment.Sep 22 2018, 5:41 PM

Apparently, the change isn't applied until the Lexeme pages are purged.