Commit Graph

32 Commits

Author SHA1 Message Date
David Taylor ec328ed3d8
DEV: Bump dependencies and fix linting (#194) 2025-02-06 17:45:14 +01: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
David Taylor f69050b8c3
DEV: Update linting (#186) 2024-11-28 17:09:09 +01:00
Jarek Radosz ca8501aaf5
DEV: Fix deprecations (getOwner and router:main) (#157) 2023-11-24 11:33:19 +01:00
Jarek Radosz bef115d760
DEV: Update linting setup (#156) 2023-11-19 22:43:42 +01:00
Alan Guo Xiang Tan cd85ea37a5
DEV: Update QUnit acceptance tests to not rely on legacy nav menu (#152)
Why this change?

The legacy navigation menu has been deprecated for quite awhile and will
soon be removed.

What does this change do?

Update the tests to test against the `sidebar` navigation menu instead
which is the default for a new Discourse install.
2023-10-03 12:22:05 +08:00
Alan Guo Xiang Tan 89c7274b1a
DEV: Correct fixtures to avoid translations error (#151)
Why this change?

In Discourse core, we have made the change to raise an error when a
interpolation argument is missing when calling `I18n.translate` to help
catch regressions in the UI where we may end up displaying broken
translations.
2023-09-13 10:53:31 +08:00
Jan Cernik 4462279b45
FIX: Update user status test (#144) 2023-07-03 11:09:38 -03:00
Jean d4ab4080db
FEATURE: add setting to show tags by group (#138)
* FEATURE: add setting to show tags by group
2023-06-09 11:02:17 -04:00
Penar Musaraj c2f27d1e3b
FIX: Toggling categories was requiring two clicks (#134) 2023-05-24 16:06:09 -04:00
Alan Guo Xiang Tan 0b4d2f3691
DEV: Update tests due to core changes (#128) 2023-04-12 15:52:30 +08:00
Ted Johansson 002dd91a05
FIX: Fix an issue where deselecting a filter tag would cause no results (#126)
In some cases, when having multiple tag filters selected and results in the list, deselecting one of the filters would cause no results. This is clearly incorrect behavior, as fewer filters should lead to more (or at least the same number of) results.

This happens when you have a list of selected filters, e.g. `foo|bar|baz`, and you deselect the "middle" one. This will result in the following filter: `foo||baz`, which causes the back-end to try and filter on empty string as well, and in turn leads to no results.

The order of the filter list depends on the order they were selected, which caused this to seem a bit erratic.

In the code, there's a regular expression that tries to remove consecutive `|` characters, but this is anchored to the beginning of the string, so it doesn't work for this case.

Instead of relying on a regular expression, this change splits the string into an array, filters out the deselected tag, and joins it back together into the filter string. This avoids the issues that regular expressions have.

The PR also includes unit tests for the three code paths of the filter selection.
2023-04-03 13:56:41 +08:00
Andrei Prigorshnev a5823e3a05
FEATURE: Make user status on mentions on docs live (#117)
This makes status on mentions in docs receive live updates 
from the server.
2023-03-24 21:11:50 +04:00
Jarek Radosz f4c8e72293
FIX: Make `docsCategories` ignore invalid ids (#125) 2023-03-24 11:07:18 +01:00
Alan Guo Xiang Tan 018301d004
DEV: Update sidebar section selector due to core changes (#124) 2023-03-23 13:20:41 +08:00
Blake Erickson 3e489f8d1f
DEV: Fix failing test if sidebar is enabled by default (#116)
This PR https://github.com/discourse/discourse/pull/19406 enables the
sidebar on by default, so we need to set the sidebar to legacy like the
original test assumed.
2022-12-12 14:43:14 -07:00
Alan Guo Xiang Tan b2404797f2
DEV: Update experimental sidebar site setitng to follow core (#115) 2022-12-08 09:44:03 +08:00
Frank 6b3f2576c3
FEATURE: add a global setting to support custom docs url path (#107)
* FEATURE: add a global setting to support custom docs url path

This commit adds a GlobalSetting `docs_path` to support custom docs url
path for sites that do not want docs page to live at `/docs` and have a
customized path.

* Fixed the route declaration

* Test and linting

* Update server.en.yml

* Fixed doc test

* Fixed linting.

* Testing qunit test fix

* Fixed tests

* Prettified tests

* Changed the implementation from SiteSetting to GlobalSetting instead.

* Fixed tests

* Cleanup

* Using Site instead of .js.erb to pass GlobalSetting.docs_url to the front end.

Also fixed front end tests

* Remove references to obsolete site setting

* remove unused fixture file

* Rename `docs_url` to `docs_path` and use camelCase in JavaScript

* Add serializer tests

Co-authored-by: Arpit Jalan <er.ajalan@gmail.com>
2022-11-17 11:33:38 +05:30
David Taylor c083f0140a
DEV: Ensure tests work when plugin CSS is loaded (#108)
CSS can slightly affect the result of element.innerText. Preparation for https://github.com/discourse/discourse/pull/18668
2022-10-19 15:53:21 +01:00
Alan Guo Xiang Tan 2589e82212
DEV: Update tests after changes in core (#103) 2022-07-28 16:32:51 +08:00
Alan Guo Xiang Tan fc2750e1d1
DEV: Update tests to use new site settings (#102) 2022-07-27 12:55:45 +08:00
Jarek Radosz 632042981f
DEV: Remove `isLegacyEmber` (#100) 2022-06-28 22:10:02 +02:00
Alan Guo Xiang Tan 2b6a1f468d
FEATURE: Register docs link under sidebar topics section. (#95) 2022-05-26 09:24:30 +08:00
Jarek Radosz 650b10ef42
DEV: Lose the es6 suffix (#84) 2022-03-05 17:23:56 +01:00
Andrei Prigorshnev 6bad85b1ef
FEATURE: improve blank page syndrome (#79) 2022-01-28 20:10:53 +04:00
David Taylor 05678c451c DEV: Bump eslint-config-discourse and correct violations 2022-01-26 14:46:52 +00:00
Joffrey JAFFEUX 8321e74b60
DEV: fixes qunit imports (#64) 2021-10-22 09:51:23 +02:00
Jordan Vidrine d8c48e6218
FEATURE: Add filter + alpha & numeric sort to categories and tags in docs sidebar (#62)
* UX: Docs sidebar changes

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2021-10-19 10:04:36 -05:00
Jarek Radosz 378f8d24f4
FIX: Correctly trigger actions (#45)
Fixes a regression introduced in #32. Reported in https://meta.discourse.org/t/meta-discourse-org-docs-sidebar-filter-doesnt-work/188350/2

Included:
* DEV: Use `query` helper
* DEV: Simplify the Docs model
* DEV: Add a test
* FIX: Correctly trigger actions
* DEV: Use `count` instead of `queryAll`
2021-04-29 16:36:14 +02:00
Justin DiRose f32aebdba0
FEATURE: Rename from Knowledge Explorer to Docs (#27)
After internal discussion, the team decided to rename this plugin to `discourse-docs`. No substantial changes made here aside from a settings migration.
2021-01-18 10:38:09 -06:00
discoursebot 0d396f921e
DEV: Update CI workflows (#23)
Updates CI from discourse/.github

Co-authored-by: justindirose <justindirose@users.noreply.github.com>
2021-01-11 14:45:20 -06:00
Jarek Radosz 731c2451cd
DEV: Add a js smoke test (#20)
One test is infinitely better than zero. The math checks out.
2020-11-16 18:30:40 +01:00