[MGNLUI-2347] White-space characters are almost invisible, when used as values in trees and lists Created: 04/Nov/13  Updated: 09/Mar/21  Resolved: 09/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: tree/list
Affects Version/s: 5.1, 5.3, 5.4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andreas Weder Assignee: Unassigned
Resolution: Obsolete Votes: 1
Labels: next, usability, ux
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 1 Enter char with leading spaces.png     PNG File 2 Leading spaces are not shown.png     PNG File 3 Leading spaces lead to exc.png     PNG File Unicode open box char.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If you're using whitespace characters in values shown in a tree or list, t*hose whitespace characters are almost invisible due to the proportional font we're using*. Furthermore, whitespace characters at the front and at the end of a string are removed for display as we trim all strings showing up as values.

This is quite a usability issue as it makes it hard to find accidentally entered whitespace characters, e.g. in the configuration tree. You essentially have to double-click on a value to enter edit mode to be able to detect it at all.

I've attached an example, where I deliberately enter leading spaces in front of a number. This leads to an exception, as this doesn't result in a valid number, but it doesn't show in the tree, as the leading space characters are stripped away before being shown. They are still there, though.

I suggest we do the following:

  • We make it optional to trim strings in certain trees (e.g. config) or simply no longer trim strings at all. After all, the whitespace characters are part of the value as it was entered.
  • We show the full value using a tooltip: we show the Unicode "open box" character instead of space characters everywhere and use a monospace font there to make it easier to discern whitespace from regular characters.


 Comments   
Comment by Simon Aebli [ 02/Dec/14 ]

I just had this problem in the config tree in Magnolia 5.3.
It seems that leading whitepaces are trimmed for display, so it's not just an issue with spacing.

Generated at Mon Feb 12 08:55:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.