Page MenuHomePhabricator

Sense Ids are wrapping but shouldn't
Closed, ResolvedPublic2 Estimated Story Points

Description

The IDs of senses are wrapping around after the -. The IDs of forms don't and that looks better:


Screenshot from https://www.wikidata.org/wiki/Lexeme:L21966

Also these two elements have very different CSS, which is strange:

.wikibase-lexeme-sense-id {
    padding: 5px 0;
    flex-basis: 3.75em;
    flex-shrink: 0;
}

vs

.wikibase-lexeme-form-id {
    font-size: 1em;
    min-width: 2.5em;
    margin-right: 1.25em;
}

Shouldn't sense headers and form headers be styled very similarly?

Acceptance criteria:

  • Sense IDs do not wrap

Event Timeline

Michael created this task.Nov 27 2018, 2:49 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 27 2018, 2:49 PM
abian added a subscriber: abian.Nov 27 2018, 3:17 PM

I suggest we have a common CSS class for both senses and forms (.wikibase-lexeme-feature-id, .wikibase-lexeme-attribute-id or similar). I can go ahead if you agree.

Well, there is some justification for distinguishing between them. Glosses stack vertically, representations horizontally:

However, it doesn’t hurt to add a common CSS class (without removing the specific ones) and then check which CSS properties need the distinction and which don’t. For the name, I would suggest wikibase-lexeme-sub-entity-id, matching the LexemeSubEntityId class we have in PHP (with subclasses SenseId and FormId).

abian added a comment.Nov 27 2018, 5:09 PM

I think the fact that glosses and representations are displayed differently isn't related to this issue, both .wikibase-lexeme-sense-id and .wikibase-lexeme-form-id should be displayed in the same way. I wouldn't remove the specific classes either, although they would remain with no CSS rules.

Lydia_Pintscher triaged this task as Low priority.Jan 6 2019, 6:14 PM
Addshore updated the task description. (Show Details)Jan 22 2019, 2:18 PM
Addshore set the point value for this task to 2.

Change 486031 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Add white-space: nowrap to sense id element

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJan 23 2019, 8:49 AM

Change 486031 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add white-space: nowrap to sense id element

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

(Waiting for deployment to verify on the example given.)

Ladsgroup moved this task from incoming to in progress on the Wikidata board.Jan 30 2019, 1:35 PM
Lydia_Pintscher closed this task as Resolved.Feb 7 2019, 11:36 AM

\o/
This is done but it still looks bad because Sense IDs are too close to the dividing bar. I'll open a new ticket for it.