Commit Graph

263 Commits

Author SHA1 Message Date
Kelv 00a96b36f0
DEV: Switch to use pnpm (#179) 2024-10-14 13:39:41 +02:00
dependabot[bot] dc70b637c4
Build(deps): Bump micromatch from 4.0.5 to 4.0.8 (#178)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 12:46:20 +02:00
dependabot[bot] 5f4528adf7
Build(deps-dev): Bump rexml from 3.3.3 to 3.3.6 (#177)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.3 to 3.3.6.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.3...v3.3.6)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 12:31:23 +02:00
dependabot[bot] 7f33a0a583
Build(deps-dev): Bump rexml from 3.2.8 to 3.3.3 (#176)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.8 to 3.3.3.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.8...v3.3.3)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 13:19:59 +02:00
Natalie Tay ea3e90ac25
DEV: Pin plugin for Discourse < 3.4.0.beta1-dev (#175) 2024-08-02 17:05:55 +08:00
Martin Brennan 7721b1646d
DEV: Update defer_track_visit method in line with core (#174)
When https://github.com/discourse/discourse/pull/27761 is
merged in core the v2 method name is obsolete and we
can call `defer_track_visit` once more.
2024-07-08 16:37:25 +10:00
Martin Brennan 0d9365571b
DEV: Use new core code API for topic view tracking (#173)
Brings this plugin into line with the changes at
https://github.com/discourse/discourse/pull/27533,
where we have split the topic view tracking into
2 controller functions.
2024-07-08 10:14:50 +10:00
dependabot[bot] 11dcab8466
Build(deps): Bump braces from 3.0.2 to 3.0.3 (#172)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:29:57 +02:00
Discourse Translator Bot 22cb18fa7d
Update translations (#171) 2024-05-31 12:27:47 +02:00
Loïc Guitaut 04c40f58ba
DEV: Update rubocop-discourse to version 3.8.0 (#170) 2024-05-28 11:16:27 +02:00
dependabot[bot] 206a73c368
Build(deps-dev): Bump rexml from 3.2.6 to 3.2.8 (#169)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.6 to 3.2.8.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 23:55:38 +02:00
Discourse Translator Bot 8395a4d990
Update translations (#168) 2024-04-09 18:49:03 +02:00
Bianca Nenciu e90a3193df
FIX: Load complete category objects (#167)
Not all categories are preloaded when lazy_load_categories is enabled.
In this case, the category objects that are loaded through /docs.json
must be complete.
2024-04-04 10:23:42 +03:00
Selase Krakani 22107a114d
DEV: Pin plugin for Discourse < 3.3.0.beta1-dev (#165) 2024-02-29 13:51:17 -07:00
Loïc Guitaut 3e7b7c4061
DEV: Fix new Rubocop offenses (#166) 2024-02-29 18:14:03 +01:00
Discourse Translator Bot 94c7b7da21
Update translations (#164) 2024-01-23 18:29:49 +01:00
Jarek Radosz 75646d121e
DEV: Update linting (#163) 2024-01-15 11:17:26 +00:00
Kris 1fe484e1dc
DEV: pass topic arg to below-docs-topic (#162) 2024-01-04 14:47:11 -05:00
Jarek Radosz 8b02f32ad6
DEV: Update linting (#161) 2023-12-13 21:26:40 +01:00
Osama Sayegh 1d110f4b60
DEV: Remove decoration for legacy hamburger menu (#160)
The `legacy` option has been removed from the `navigation_menu` site setting, so we can remove all the logic that's related to the `legacy` option from this plugin.

Internal topic: t/113137.
2023-12-11 13:05:41 +03:00
David Taylor 30e32fa59a
UX: Only perform search when enter key is pressed (#159)
This makes docs search behavior consistent with the rest of Discourse. It also resolves a UX issue where the live search would cause the input to lose focus while typing.
2023-12-04 14:19:45 +00:00
Jarek Radosz 500066c48c
DEV: Update linting (#158) 2023-11-29 23:05:10 +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
Martin Brennan 76a76dbf0d
DEV: Metadata update for plugin.rb (#154)
* Update plugin.rb metadata

* Update plugin.rb

---------

Co-authored-by: AlexDev <104522507+alexdevlaeminck@users.noreply.github.com>
2023-11-07 17:27:01 -08:00
dependabot[bot] 50363dcd26
Build(deps): Bump @babel/traverse from 7.22.1 to 7.23.2 (#153)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.1 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 11:52:37 +02: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
Discourse Translator Bot cdf5614728
Update translations (#150) 2023-08-23 09:29:53 +02:00
Penar Musaraj 6c808e76f8
DEV: Pin plugin for Discourse 3.1 stable (#149) 2023-08-22 13:47:24 -05:00
Discourse Translator Bot a4b203274b
Update translations (#148) 2023-08-15 21:25:11 +02:00
dependabot[bot] 126da8aaa6
Build(deps): Bump word-wrap from 1.2.3 to 1.2.4 (#147)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 01:31:23 +02:00
Renato Atilio 025bf46f8d
FEATURE: add local onebox handler for /docs urls (#145) 2023-07-14 10:35:11 -03:00
dependabot[bot] 8180b9cfb7
Build(deps): Bump semver from 6.3.0 to 6.3.1 (#146)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 10:45:48 +02:00
Jan Cernik 4462279b45
FIX: Update user status test (#144) 2023-07-03 11:09:38 -03:00
Discourse Translator Bot b22c682077
Update translations (#143) 2023-06-20 17:27:46 +02: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
Jean ed77e768e6
FIX: English translation for the tag groups setting description (#142) 2023-06-13 12:59:44 -04:00
Discourse Translator Bot 55f3dffa0c
Update translations (#141) 2023-06-13 15:18:55 +02: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
Discourse Translator Bot e95388ea0b
Update translations (#137) 2023-06-06 15:37:02 +02:00
Mark VanLandingham 5a8bbc3f87
FEATURE: Site setting to control search menu tip addition (#136) 2023-06-05 09:39:31 -05:00
Isaac Janzen 04af2c4d33
DEV: Use angle bracket syntax (#135) 2023-05-26 16:16:08 -05:00
Penar Musaraj c2f27d1e3b
FIX: Toggling categories was requiring two clicks (#134) 2023-05-24 16:06:09 -04:00
Jarek Radosz d4ecda50ff
FIX: Incorrect plugin name in `requires_plugin` (#133)
This resulted in `Required plugin 'docs' not found` warnings in logs
2023-05-12 12:54:29 +02:00
Keegan George 3f412f3666
FIX: Icons not appearing (#132) 2023-05-10 12:53:12 -07:00
Isaac Janzen e00946e200
DEV: Use angle bracket syntax (#130) 2023-05-02 09:26:06 -05:00
Alan Guo Xiang Tan 0b4d2f3691
DEV: Update tests due to core changes (#128) 2023-04-12 15:52:30 +08:00
David Taylor 8b851ab3d4
UX: Hide non-functional revision history button (#127)
This button doesn't work in the docs topic view. The docs plugin has deliberately disabled other forms of interactivity on posts (e.g. reply/edit/quote), so it makes sense to hide this as well.
2023-04-03 20:10:13 +01: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