# Topic Preview Modal

**URL:** https://meta.discourse.org/t/topic-preview-modal/409712
**Category:** Theme component
**Created:** [August 10, 2026, 3:54pm UTC](https://meta.discourse.org/t/topic-preview-modal/409712 "2026-08-10T15:54:59Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 11, 2026, 12:35am UTC](https://meta.discourse.org/t/topic-preview-modal/409712/10 "2026-08-11T00:35:47Z")

</div>

> [@Jagster](#):
>
> ![IMG_3345](https://global.discourse-cdn.com/meta/original/4X/6/3/1/63150fde94af89f81bcf9330cc9c05133a6c44e8.png)
> 
> It has problems with math.

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](https://github.com/VaperinaDEV/discourse-topic-preview-modal/commit/f9eb70fd4f67108bcba37ace1cae6761b35fd5ff)

* * *

> [@RGJ](#):
>
> The only thing I’m missing is a bigger / configurable width,

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

* * *

> [@NateDhaliwal](#):
>
> I’m curious: why didn’t you reuse core’s [`<PostList>`](https://github.com/discourse/discourse/blob/main/frontend%2Fdiscourse%2Fapp%2Fcomponents%2Fpost-list%2Findex.gjs) component?

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.

---

_[View the full topic](https://meta.discourse.org/t/topic-preview-modal/409712)._
