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.
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.
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.
* 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>
After internal discussion, the team decided to rename this plugin to `discourse-docs`. No substantial changes made here aside from a settings migration.