Page MenuHomePhabricator

Default view trims strings
Open, In Progress, LowestPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The leading spaces are not shown.

What should have happened instead?:
They should be somehow noticeable.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

We can make the simple-rendering of strings to be "foo" rather than foo which will make this particular problem go away (showing " w o r l d " and "w o r l d " but I /think/ the browser will always chomp multiple consecutive whitespace characters together (so " w o r l d " and " w o r l d " will both look the same), and there's not much we can do about that if rendering them as content text.

In browser you may want to replace space with nbsp.

In browser you may want to replace space with nbsp.

Sure, but I believe Vue 3 still has the upstream bug that it will chomp those anyway.

Change 997536 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] ZObjectToString: Wrap string outputs in double quotes to make leading/trailing whitespace visible

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

Change 997536 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ZObjectToString: Wrap string outputs in double quotes to make leading/trailing whitespace visible

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

DVrandecic triaged this task as Lowest priority.
DVrandecic updated Other Assignee, added: DVrandecic.
DVrandecic updated Other Assignee, removed: DVrandecic.
DVrandecic moved this task from Needs Product/Design to Backlog on the Abstract Wikipedia team board.

Change #1015019 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] ZObjectToString: Use white-space: pre-wrap; to preserve whitespace in string values

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

Jdforrester-WMF changed the task status from Open to In Progress.Mar 27 2024, 12:21 PM
Jdforrester-WMF moved this task from Backlog to In Progress on the Abstract Wikipedia team board.

Change #1015019 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ZObjectToString: Use white-space: pre-wrap; to preserve whitespace in string values

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

It looks good in the summary mode:

image.png (194×332 px, 7 KB)

but not when the summary is expanded:

image.png (359×240 px, 9 KB)