Commit Graph

8 Commits

Author SHA1 Message Date
Loïc Guitaut 2bd528a23d
DEV: Add system spec to check core features are working fine (#204) 2025-04-09 14:22:33 +02:00
David Taylor cd7c990472
DEV: Resolve excerpt issue in specs (#206) 2025-04-02 17:22:49 +01:00
Alan Guo Xiang Tan 66d2936562
DEV: Resolve state leak causing flaky test (#205) 2025-04-02 10:10:40 +08:00
Alan Guo Xiang Tan 7014d6707e
DEV: Skip a flaky test (#203)
This test has been flaky on CI and also failing even after a rerun on
multiple occasions.
2025-03-19 13:41:51 +08:00
Penar Musaraj 664aa6f95a
DEV: Try fixing flakey spec (#200)
* DEV: Try fixing flakey spec

* fix copy/paste
2025-03-14 10:39:20 -04:00
David Taylor ee5111a628
DEV: Update for glimmer topic list (#189)
This switches docs to use the core `<BasicTopicList` component, with some customizations made via the DAG API.
2025-01-07 11:52:34 +00:00
Loïc Guitaut 3e7b7c4061
DEV: Fix new Rubocop offenses (#166) 2024-02-29 18:14:03 +01:00
Jordan Vidrine 06f6d00ba1
FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140)
* FEATURE: Optionally show topic excerpts in docs index

This commit adds a new docs_show_topic_excerpts site setting
which, when enabled and used in conjunction either with the
always_include_topic_excerpts site setting or the
serialize_topic_excerpts theme modifier.

For the theme modifier, this commit also fixes an issue
with the Docs::Query class. Since we were re-initializing
Guardian within the class (rather than using the guardian
passed down from the controller), we did not have the request
information needed to determine theme_id, which meant that
the theme modifier had no effect. We now pass down guardian
from the controller instead. In general guardian is almost
always better than a user object, since we can always just
call guardian.user.

Adds a simple system spec as well.

---

We now check both the serialize_topic_excerpts theme modifier
and the always_include_topic_excerpts site setting server-side
within Docs::Query, and use that on the client to determine
whether or not to show the excerpts for docs. This is because if
someone sets one of those values it's logical to think it will
apply everywhere there is a topic list.

Also include a system spec to test whether the theme modifier
works to show the excerpts.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2023-06-15 12:44:44 -05:00