Page MenuHomePhabricator

Spacing between diff and pipe separator is double what it should be in Special:Contributions
Open, Needs TriagePublic

Description

Visit https://en.wikipedia.org/wiki/Special:Contributions/Jdlrobson


Notice the gap between diff and pipe separator is bigger than that between hist and the pipe separator.
The problem is due to the fact that pipe-separator is defined as " | " rather than "| " and a space was added for accessibility reasons for screen reader BEFORE the pipe.

We need to find some way of collapsing 1 space in the HTML and 1 space in the CSS to 1 space to resolve this problem.


Also discussed at: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Problems_with_edit_summaries

Event Timeline

Jdlrobson renamed this task from Spacing between diff and pipe separator is double what it should be to Spacing between diff and pipe separator is double what it should be in Special:Contributions.Nov 30 2018, 3:58 PM
Jdlrobson updated the task description. (Show Details)

Here we go: https://en.wikipedia.org/wiki/MediaWiki:Pipe-separator?action=edit

That's a non-breaking space.

Solution: delete that override (after figuring out why it was created and confirming it can be deleted).

And   entity is magically converted to the actual character (so it still works in CSS) by silly code in MessageCache::get(), which allegedly works around some old Firefox bug?

Anomie added a subscriber: Anomie.EditedNov 30 2018, 5:33 PM

Solution: delete that override (after figuring out why it was created

The edit summary on the edit that created it seems informative: "stop parserfunctions etc from eating the spaces, and ensure that linewraps occur after the separator, not before".

And   entity is magically converted to the actual character (so it still works in CSS) by silly code in MessageCache::get(), which allegedly works around some old Firefox bug?

The commit summary on rSVN51453: General fix for trailing whitespace in messages, so that we don't have to put… makes me think that we added   and   into a bunch of messages because they were getting screwed up by the edit form, and then the conversion there when fetching the message was added so ->plain() or ->text() would still give spaces rather than HTML entities in contexts where entities would break.

If that's right, then the Firefox bug was that <textarea> was turning literal NBSPs into spaces when the message was edited.

Is this modification present on other projects?

matmarex updated the task description. (Show Details)Dec 1 2018, 6:26 PM

The some local messages replace the first space by &nbsp; (U+00A0) to prevent that the line gets wrapped before the pipe (or similar) symbol. Because U+00A0 is not a whitespace it can not collapse with the whitespace between the two spans.

A change from

.mw-changeslist-links {
	> span:not( :first-child ):before {
		content: '@{msg-pipe-separator}';
	}
}

to

.mw-changeslist-links {
	> span:not( :last-child ):after {
		content: '@{msg-pipe-separator}';
	}
}

solves this problem, because the space after the pipe symbol is not replaces by a no-break space and can collapse with the space between the spans.

https://zh-yue.wikipedia.org/wiki/MediaWiki:Pipe-separator replaced the pipe-separator by the fullwidth form (U+FF5C) without surrounding spaces. Here the space between the spans can not collapse with a space and leads to a unsymmetrical distance. Maybe a zero-width space between the spans would solve this problem and still prevent screen readers from failures.

Jdlrobson moved this task from Inbox to Next up on the User-Jdlrobson board.Jan 2 2019, 7:39 PM
Jdlrobson moved this task from Next up to Focus on the User-Jdlrobson board.Feb 28 2019, 8:59 PM
JTannerWMF moved this task from Inbox to External on the Growth-Team board.Feb 28 2019, 9:14 PM
Jdlrobson moved this task from Focus to Inbox on the User-Jdlrobson board.Mar 28 2019, 12:26 AM
Nirmos removed a subscriber: Nirmos.Jul 4 2019, 2:40 AM