Weird text formatting/wrapping on mobile [1.9.0.beta10]

AI-generated summary

A discussion on the Infinite Flight community forum addresses a text formatting issue in Discourse 1.9.0.beta10, where text next to buttons appears awkwardly wrapped on small mobile screens. Users insertusernamehere, codinghorror, and jomaxro report the problem, with j.jaffeux acknowledging it as a design choice that may not work well on small screens. j.jaffeux proposes a solution that adjusts text flow based on screen size, showing examples of improved formatting. Users generally approve of the new design, with insertusernamehere praising the result. codinghorror suggests reverting to the pre-update behavior—text moving beneath the button on narrow screens—while schungx proposes a conditional layout based on text length and language, noting that non-Latin scripts like Chinese may look better when kept on one line.

  • The forum is community.infinite-flight.com

  • Discourse version is 1.9.0.beta10

  • Phone is a Samsung Galaxy core prime - 4.5" display, running Android 5.1.1

  • Using Google Chrome - stable edition

Since we’ve updated to the 1.9.0.beta10 , at the bottom of threads the text formatting next to buttons has been weird. Not sure this is intentional?
Not thread or category specific


Thanks in advance for any help,
John

This is @j.jaffeux’s code, can you repro here on meta though?

2 « J'aime »

I certainly can repro, It was a choice, but it can indeed be weird on small screens. I will find a better solution.

3 « J'aime »

Yep, it’s the exact same here :slight_smile:

Sounds fantastic, thanks @j.jaffeux!

1 « J'aime »

@insertusernamehere, do you have any thoughts/suggestions on what you’d like to see here? It’s a lot of text to fit on a small screen.

1 « J'aime »

We just want it to follow the flow.

2 « J'aime »

“As it was before” is the best I can say :frowning_face:. Sorry for the vagueness :(. @j.jaffeux put it perfectly

1 « J'aime »

I have tried to keep the best of both ideas:

This is on a small screen (makes the text as readable as possible and limits the waste of vertical space in case it would create more than 2 lines):

This is on a larger screen (put the text on two lines elegantly and without losing vertical space):

Is this what you would expect? @insertusernamehere

4 « J'aime »

That’s great - looks really nice. Thanks!

1 « J'aime »

It is not the same as before; prior to this the text cleared on mobile and appeared underneath the button, not next to it.

So I suggest a media query that at certain narrow widths puts the text underneath.

2 « J'aime »

This is actually the easiest thing to do, you would prefer this behaviour?

2 « J'aime »

How it looked before always looked amazing, so yes, as long as it isn’t any trouble for you guys.

:smile: thanks for the speedy help!

1 « J'aime »

At narrow widths I think this is the obvious choice.

2 « J'aime »

How about tugged to the right unless the text occupies less than half of the width, meaning a long button. Then it moves down.

I suppose this can be easily done by setting the text to min-width:50%? If less than half space is needed then move below.

Beware, though, the not all languages are long. German probably will be long, but Chinese will look great even wth only 1/3 of the space and will look weird moved down the line.