Large emojis in post preview of bookmarks

AI-generated summary

Users reported that large emojis appear in the post preview of bookmarks, particularly in official plugin/theme topics, which visually disrupts the layout. Moin demonstrated the issue with screenshots, suggesting smaller emojis would be more appropriate. Ondrej confirmed the bug persisted. Chapoi initially considered a CSS fix but noted the emojis carry the only-emoji class — which, while technically correct due to how excerpts are generated from posts containing tables, is visually misleading. Martin clarified the issue stems from post excerpt rendering logic, not the editor, and suggested a potential fix might require a new no_big_emoji option in PrettyText.cook. Ultimately, Chapoi confirmed the issue was resolved via pull request #34924, indicating the fix was implemented in core code rather than as a temporary CSS workaround.

Steps to reproduce:

  1. Bookmark an official plugin or theme component (It works with some non-official ones too)
  2. Visit https://meta.discourse.org/my/activity/bookmarks

I think small emojis would fit better.

3 Likes

Just a bump on this as its still present now.

2 Likes

@renato I was about to apply a CSS fix but those emoji’s actually get a class only-emoji they should not have.

I’ve found this from 5y ago

https://github.com/discourse/discourse/commit/948bd00340d12fdd68aec06fee8eccd21d35b7e9

But with the recent changes with prosemirror, I think things may have changed?

Anyway, would prefer to properly fix it instead of applying a CSS bandaid.

1 Like

This isn’t to do with the editor, it’s to do with the post excerpts. For this list we use:

And because the OP of these theme topics have tables, those get stripped out, and we end up with this kind of thing:

:discourse2:
Summary
Topic Cards restyle the topic list to display as cards with a thumbnail


<img src="//localhost:4200/images/emoji/twitter/eyeglasses.png?v=14" title=":eyeglasses:" class="emoji only-emoji" alt=":eyeglasses:" loading="lazy" width="20" height="20">
Preview
<a href="https://discourse.theme-creator.io/theme/Discourse/topic-cards">Preview on Discourse Theme Creator</a>


<img src="//localhost:4200/images/emoji/twitter/hammer_and_wrench.png?v=14" title=":hammer_and_wrench:" class="emoji only-emoji" alt=":hammer_and_wrench:" loading="lazy" width="20" height="20">
Repository
<a href="https://github.com/discourse/discourse-topic-cards">https://github.com/discourse/discourse-topic-cards</a>


<img src="//localhost:4200/images/emoji/twitter/open_book.png?v=14" title=":open_book:" class="emoji only-emoji" alt=":open_book:" loading="lazy" width="20" height="20">
New to Discourse Themes?
<a href="https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966">Beginner’s guide to using Discourse Themes</a>


Wow topic

So technically the only-emoji is correct here, but practicallly it’s wrong. I think this could be fairly tricky to fix…maybe we need a no_big_emoji option for PrettyText.cook…but IDK for sure.

1 Like

fixed in

https://github.com/discourse/discourse/pull/34924

2 Likes

This topic was automatically closed after 5 days. New replies are no longer allowed.