Topic Preview Modal

I’ve implemented this as an excluded_categories setting: FEATURE: Add excluded categories setting - Pull Request #13 - VaperinaDEV/discourse-topic-preview-modal - GitHub

I initially considered making the behavior depend on where the topic is being viewed, but I think checking the topic’s actual category is the more consistent approach.

This means that if a category is excluded, its topics will always open as full topics rather than in the modal, whether they appear inside that category, on /latest, or in another topic list.

I think this also avoids the potentially confusing situation where the same topic could open in a modal in one place but as a full topic in another.

2 likes

I’ve fixed two issues: FIX: unread dot not clearing for nested topics and never-opened topics - Pull Request #14 - VaperinaDEV/discourse-topic-preview-modal - GitHub

  1. Nested view: readPosts() was delegated to core’s site-wide nested controller instead of the modal’s own postRegistry, so the per-post read-state dot was never cleared inside the modal.
  2. New topics: only unread_posts, unread, and new_posts were reset, but the separate unseen flag that drives the new-topic dot wasn’t, so it remained visible in the topic list after the topic was read in the modal.
1 like