Page MenuHomePhabricator

Spacing between diff and pipe separator is double what it should be in Special:Contributions
Closed, ResolvedPublic

Description

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

Screen Shot 2018-11-30 at 7.53.48 AM.png (28×539 px, 15 KB)

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?

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?

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.

Is this still an issue? I can't observe this on any skin anymore. Might have been resolved since this deletion by @MusikAnimal.

Jdlrobson claimed this task.

Yep this should be fixed on wikis where the problem remains.