Skip to content

FEATURE: simple mode for Discourse docs#83

Draft
SamSaffron wants to merge 5 commits intomainfrom
simple
Draft

FEATURE: simple mode for Discourse docs#83
SamSaffron wants to merge 5 commits intomainfrom
simple

Conversation

@SamSaffron
Copy link
Copy Markdown
Member

@SamSaffron SamSaffron commented Mar 18, 2026

Removes a lot of the visual noise from docs

Requires discourse/discourse#38766

Removes a lot of the visual noise from docs
Instead of hiding reply posts with CSS display:none and fighting the
cloaking system, filter the post stream's ID array so replies are never
rendered. Uses the topic-post-stream transformer to monkey-patch
updateFromJson on doc category PostStream instances.

All posts are stored in the identity map on initial load, then the
stream and posts arrays are trimmed to the OP only. Toggling comments
restores posts from the identity map synchronously with no network
request.
@megothss megothss changed the title FEATURE: simple mode for dicourse docs FEATURE: simple mode for Discouse docs Mar 21, 2026
@megothss megothss changed the title FEATURE: simple mode for Discouse docs FEATURE: simple mode for Discourse docs Mar 21, 2026
SamSaffron and others added 3 commits March 30, 2026 14:55
When simple mode is enabled, the topic list should show only what
matters for documentation: topic titles and last updated date. Three
remaining visual elements were adding noise across all themes.

- Delete the "views" column (was kept alongside posters/replies removal)
- Hide inline category badge via CSS scoped to `.doc-simple-mode`
  (redundant when browsing within a single doc category)
- Hide topic excerpts on pinned topics (documentation index should be
  a scannable list, not a reading view)

Ref - t/179937

Requires discourse/discourse#38970
ZogStriP added a commit to discourse/discourse that referenced this pull request Apr 8, 2026
Doc-categories' simple mode presents documentation as a clean,
minimal topic list focused on "what" (titles) rather than "who and
when" (avatars, dates, replies). Horizon's card layout was overriding
this by applying its rich card UI to all discovery contexts, including
doc categories.

`isTopicCardContext` now checks `category.doc_index_topic_id` and
returns false for doc categories, letting the doc-categories plugin's
own transformers (column removal, "Updated" header, `doc-simple-mode`
class) take effect unchanged.

All transformer call sites updated from `fn(context.listContext)` to
`fn(context)` so the category is available for the check.

Ref - t/179937
Used by discourse/discourse-doc-categories#83

## Horizon
<img width="1980" height="1549" alt="2026-03-31 @ 10 22 19"
src="https://github.com/user-attachments/assets/ed83cdf7-8a30-42c2-90d5-9fb57eb45114"
/>

## Foundation
<img width="1980" height="1549" alt="2026-03-31 @ 10 22 17"
src="https://github.com/user-attachments/assets/5c528bb8-059f-4bb8-aa59-e4494a114182"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants