tour icon indicating copy to clipboard operation
tour copied to clipboard

tour: The output message cannot show long text completely.

Open OlingCat opened this issue 9 years ago • 3 comments

On a tour page like this, if we replaced

fmt.Println("Hello, 世界")

with

fmt.Println("The output message cannot be wrapped correctly if it is too long.  [This message can not be displayed completely below.]")

the bug will be triggered.

OlingCat avatar Jul 14 '16 19:07 OlingCat

The underlying issue is that the "terminal-like" window below does not implement wrapping. I'm not sure how easy it would be to fix this (or if is would be worth it at all).

ALTree avatar Jun 28 '18 13:06 ALTree

So the solution is to add Soft Wrapping to the bottom result console?

I'm asking because the terminals don't have this feature, so it would be confusing for users that are familiar with the bash terminals, but of course, it will improve the overall user experience in the tour.

When the line is too long, this happen too, if you scroll to the right (and the vertical scrollbar is invisible):

image

Another solution (easier, because it doesn't affect the height of the element), would be just to display the vertical scrollbar, when the text overflows (is too long).

bgadrian avatar Jul 10 '18 23:07 bgadrian

It is as easy as

.output > pre {
  overflow-x: auto;
}

or

.output > pre > span {
  text-wrap: wrap
}

Why is this not fixed yet, it's the easiest fix of your life

Sanian-Creations avatar May 10 '24 14:05 Sanian-Creations