Topic Preview Modal

Hey @Jagster, thanks for the report! Here is the fix: FIX: Replace visibility:hidden to allow MathJax rendering · VaperinaDEV/discourse-topic-preview-modal@f9eb70f · GitHub


Thanks @RGJ, I’ve added a setting for this.


That’s a good question.

PostList/PostListItem is built for excerpt-based summary lists (drafts, bookmarks, activity feeds), not for rendering a topic’s actual interactive post stream.

It renders @post.excerpt/expandedExcerpt through DDecoratedHtml, plus an avatar/title header and an expand-to-excerpt button. There’s no like, quote, reply, edit, or flag action - none of the interactive post machinery the modal needs.

PostList’s pagination is also one-directional (fetchMorePosts only appends going down), while the modal has to open at the last-read post and load both earlier and later posts around it - that needs the real postStream service’s gap-loading, not a simple fetch-more callback.

So reusing PostList would have meant reimplementing most of Post’s interactive behavior and postStream’s bidirectional loading on top of a component built for a different job. Using the actual core Post component + postStream directly instead guarantees the modal behaves identically to the real topic page.

3 Likes