From c60182cdb22d02b4e9215443c8ad45c69fd7fc3c Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 10 Feb 2020 13:48:47 -0500 Subject: [PATCH] UX: Prevent new badge from being orphaned on mobile --- .../templates/mobile/list/topic-list-item.raw.hbs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/mobile/list/topic-list-item.raw.hbs b/app/assets/javascripts/discourse/templates/mobile/list/topic-list-item.raw.hbs index baef9931645..727c8382d89 100644 --- a/app/assets/javascripts/discourse/templates/mobile/list/topic-list-item.raw.hbs +++ b/app/assets/javascripts/discourse/templates/mobile/list/topic-list-item.raw.hbs @@ -7,6 +7,13 @@ {{else}}
{{/unless~}} + {{!-- + The `~` syntax strip spaces between the elements, making it produce + `Some text`, + with no space between them. + This causes the topic-post-badge to be considered the same word as "text" + at the end of the link, preventing it from line wrapping onto its own line. + --}}
- \ No newline at end of file +