Commit Graph

220 Commits

Author SHA1 Message Date
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
Jarek Radosz 632042981f
DEV: Remove `isLegacyEmber` (#100) 2022-06-28 22:10:02 +02:00
Discourse Translator Bot 4e950617b7
Update translations (#99) 2022-06-21 15:27:12 +02:00
discoursebot 5e7239d93d
DEV: Update CI workflows (#98)
Co-authored-by: discoursebuild <build@discourse.org>
2022-06-17 21:34:33 +02:00
Isaac Janzen 834d22d868
DEV: Remove 'htmlSafe' string prototype extensions (#97)
## Ember Upgrade

Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-06-01 10:16:17 -05:00
Discourse Translator Bot 017bbe07df
Update translations (#96) 2022-05-31 16:11:49 +02:00
Alan Guo Xiang Tan 2b6a1f468d
FEATURE: Register docs link under sidebar topics section. (#95) 2022-05-26 09:24:30 +08:00
discoursebot 0276cca4ab
DEV: Update CI workflows (#94)
Co-authored-by: discoursebuild <build@discourse.org>
2022-05-23 17:00:14 +02:00
Isaac Janzen 679fee9def
DEV: update routing to allow for open_in_new_tab (#93)
We can rip out the `click` handler completely and just lean on the _logic_ we have in `docs-index`. 

0cef82aec0/assets/javascripts/discourse/routes/docs-index.js (L12)

It will always refresh the `selectedTopic` so there will be no need to update it within the click handler. Which then nullifies the need for `setSelectedTopic`.
2022-05-05 11:22:16 -05:00
dependabot[bot] 0cef82aec0
Build(deps): Bump async from 2.6.3 to 2.6.4 (#92)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 18:01:59 +02:00
dependabot[bot] 72b2e87e84
Build(deps): Bump ansi-regex from 4.1.0 to 4.1.1 (#90)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 17:59:18 +02:00
dependabot[bot] da16d9eb4b
Build(deps): Bump minimist from 1.2.5 to 1.2.6 (#89)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 17:55:32 +02:00
discoursebot e517e69c09
DEV: Update CI workflows (#88)
Co-authored-by: discoursebuild <build@discourse.org>
2022-03-22 14:03:20 +01:00
Kris 700008b792
DEV: add plugin outlet to enable custom checkbox css (#86) 2022-03-18 13:28:11 -04:00
Kris e7c8217570
DEV: add plugin outlets for custom controls (#87) 2022-03-18 13:27:14 -04:00
Bianca Nenciu 4c0f58d982
FIX: Remove reference to share-popup (#85) 2022-03-15 21:27:01 +02:00
Jarek Radosz 650b10ef42
DEV: Lose the es6 suffix (#84) 2022-03-05 17:23:56 +01:00
Discourse Translator Bot 9931542117
Update translations (#83) 2022-02-15 15:10:14 +01:00
Discourse Translator Bot 01f673db24
Update translations (#82) 2022-02-08 14:12:58 +01:00
Discourse Translator Bot 9c4588c80b
Update translations (#81) 2022-02-01 16:15:23 +01:00