Page MenuHomePhabricator

Remove superflous space before colon in lines with qualifiert
Closed, ResolvedPublic

Description

Since a few days lines with a qualifiert have an additional colon between key and value, see screenshot.

Maybe a result of Ic80d86e6237ae947a1fe0a01ce8e9ea11bd4a33b ?

grafik.png (327×841 px, 10 KB)

COVID-19 Deployment Criteria

  • Can you roll back this change without lasting impact?
    1. A recovery plan is required as this will help identify our capacity for recovering from the failure
    2. THIS IS A KEY QUESTION, if you can’t answer it, you shouldn’t deploy
  • Is specialized knowledge required to support this change in production? If so, are there multiple people with this knowledge?
  • Is there a way to increase confidence about the correctness of this change?
    1. Reviews (Design, Code, etc)
    2. Testing coverage (unit tests, integration tests)
    3. Manual testing (e.g. Beta, vagrant, docker)

Event Timeline

@Raymond the colon has always been there, afaik. Did you mean the space before the colon?

@Raymond the colon has always been there, afaik. Did you mean the space before the colon?

Sure, that's the title of this task :-)

Hah, so it is! In that case yes this is a duplicate of T245681

It's not a duplicate, but related.

They both have to do with an ugly workaround for whitespace handling: the HTML has whitespace to properly indent the tags etc and keep the code clear, but the separator also has whitespace (: - colon + space)
For awhile, things used to be just as described in this ticket: there was whitespace before and after the colon, which looks a little odd...

First hack was to apply display: flex in which case all whitespace between nodes/text gets omitted, but we then had to add non-printable char to safeguard the intentional space after the colon.
This worked well enough except that there appear to be circumstances where the char causes odd rendering (T245681), but we've fixed that.

We eventually switched to display: inline-table in order to be able to better position another new element: the constraints warning indicator. Except... it now appears that Chrome does collapse whitespace (like we want), Firefox does not.

So we'll need to bring back display: flex (fixed this) and change the constraints warning report positioning differently... :)

Change 581578 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Fix qualifier separator whitespace handling

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

Change 581578 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Fix qualifier separator whitespace handling

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

Raymond claimed this task.

I can confirm that this is fixed now.