Page MenuHomePhabricator

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


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

Screenshot from

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;


.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

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).

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.

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

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

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

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.