Commit Graph

289 Commits

Author SHA1 Message Date
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
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
Discourse Translator Bot 63bb46299a
Update translations (#123) 2023-02-21 17:12:22 +01:00
Discourse Translator Bot 2bf85f9740
Update translations (#122) 2023-02-15 10:51:07 +01:00
Discourse Translator Bot bf1c4574a6
Update translations (#120) 2023-01-10 20:54:42 +01:00
discoursebot 9fb2f211f4
DEV: Update CI workflows (#121)
Co-authored-by: discoursebuild <build@discourse.org>
2023-01-10 18:17:35 +00:00
David Taylor 1bb737feb0
DEV: Update eslint-config-discourse, use prettier for hbs (#119) 2023-01-04 13:36:19 +01:00
David Taylor 724100044c
DEV: Introduce syntax_tree for ruby formatting (#118) 2022-12-29 13:31:34 +01: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
Discourse Translator Bot 908d9096a8
Update translations (#114) 2022-11-29 15:37:01 +01:00
Penar Musaraj b23790e85d
UX: Expand category filters even when already filtered (#112) 2022-11-28 15:16:24 -05:00
dependabot[bot] 0727eaad14
Build(deps): Bump minimatch from 3.0.4 to 3.1.2 (#113)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-27 17:34:01 +01: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
discoursebot f1dd03f0bc
DEV: Update CI workflows (#110)
Co-authored-by: discoursebuild <build@discourse.org>
2022-11-07 12:33:04 -06:00
Discourse Translator Bot 49cfe61043
Update translations (#109) 2022-11-02 15:13:54 +01:00
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
David Taylor d941844fa8
DEV: Bump rubocop-discourse (#106)
* DEV: Bump rubocop-discourse

* Fix rubocop violations
2022-10-03 22:20:09 +02:00
Discourse Translator Bot 9cffc3e479
Update translations (#105) 2022-08-30 20:15:58 +02:00
Alan Guo Xiang Tan 13bab928c7
DEV: Update plugin API after core changes (#104) 2022-08-01 14:56:27 +08: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
Bianca Nenciu 45386920ca
FIX: Use new robots.txt API (#101)
The old robots.txt was invalid because "User-agent: *" was found twice
in robots.txt. Using the API will generate correct robots.txt.
2022-07-13 19:53:56 +03:00