Commit Graph

114 Commits

Author SHA1 Message Date
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
Krzysztof Kotlarek 7c54952414
FIX: TopicViewItem and TopicUser for doc topics (#80)
When a documentation topic is viewed, corresponding TopicViewItem and TopicUser should be created.

A method from a TopicController is called, however, specs should warn us if ever that core method would change.
2022-02-01 16:38:54 +11:00
Andrei Prigorshnev 6bad85b1ef
FEATURE: improve blank page syndrome (#79) 2022-01-28 20:10:53 +04:00
Jarek Radosz 272488b0a4
UX: Minor visual tweaks (#76) 2022-01-24 00:34:59 +01:00
Penar Musaraj 39f956fa13
DEV: Add outlet + scroll event to support DiscoTOC (#75) 2022-01-19 12:43:00 -05:00
David Taylor 841a814bfb
DEV: Update plugin-outlet arguments (#73)
Core's defaults are changing in https://github.com/discourse/discourse/pull/13685. This commit ensures the behaviour of this plugin will not change.
2022-01-06 20:33:34 +00:00
Jordan Vidrine d3eee7008b
UX: Adjust topic list item spacing (#70) 2021-11-17 13:28:40 -06:00
Jordan Vidrine 0aef9946b4
SYNTAX: Add classes in prep for Topic list refactor (#69)
* DEV: Prep for topic-list refactor
2021-11-16 13:56:12 -06:00
Kris 4631ccb8b1
DEV: add plugin outlet, li class (#68) 2021-11-05 15:09:24 -04:00
Kris 6e13e4de0b
UX: Solved filter alignment adjustment (#67) 2021-11-05 12:06:59 -04:00
jbrw c38dc7c216
FIX: Hide navigation elements when printing a Docs topic (#65) 2021-10-22 16:59:14 -04: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
Penar Musaraj bfed4ba324
UX: Add in:docs quick tip in search widget (#61) 2021-10-12 10:11:29 -04:00
Penar Musaraj 17a21cad4d
UX: Add `in:docs` filter to search (#56) 2021-07-21 15:53:40 -04:00
Penar Musaraj 8754aaf061
DEV: SCSS cleanup 2021-06-23 23:01:54 -04:00
Penar Musaraj b985ebad4c
DEV: Remove SCSS color vars fallbacks (#49) 2021-05-12 16:17:44 -04: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
discoursebot f75c9d5e32
DEV: Update CI workflows, fix linting issues (#32)
Included:

* DEV: Update CI workflows
* DEV: Update the plugin URL
* DEV: Update Gemfile.lock
* DEV: Remove an old rubocop artifact
* DEV: Add .prettierrc
* DEV: Clean up .gitignore
* DEV: Add license
* DEV: Update package.json
* DEV: Fix template issues
* DEV: Re-format code
* DEV: Use `@action`
* DEV: `inject as controller`
* DEV: Use `@computed`
* DEV: Avoid naming collision and extra indirection
* DEV: Use `discourse-common/utils/decorators`
* DEV: Use `role="button"`

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
2021-04-27 20:49:34 +02:00
Jordan Vidrine a5bd6954c0
FEATURE: Add `selectTag`, `tags`, and `categories` to plugin outlet. (#38) 2021-03-23 08:50:44 -05:00
Justin DiRose f61de2d871
DEV: Add parameter to plugin outlet (#37)
This adds a parameters to the args hash of the before-docs-search plugin outlet so we can access tags via theme components using this outlet.
2021-03-15 11:23:37 -05:00
Penar Musaraj c7376c243d
UX: Fix two small mobile styling issues (#36) 2021-02-24 11:40:32 -05:00
Justin DiRose 2ee446b1fa
FEATURE: Add link to Docs in top menu (#34)
Added a plugin setting so admins have the choice of including a link to Docs in the top menu.
2021-02-18 15:24:52 -06:00
Justin DiRose 399fbec04f
FIX: Back button out of alignment (#31)
Core made buttons to use flexbox recently, which changed the behavior of
the go back button on Docs topics. The local justify-content declaration
overrides the core declaration causing problems.
2021-02-01 09:53:38 -06:00
Joffrey JAFFEUX ce005939c1
DEV: prettier 2.2.1 (#30) 2021-01-27 10:37:03 +01:00
Justin DiRose b13abb992c
FIX: Compute topic title correctly (#29)
Was using `unicode_title` but not all topics return a unicode_title
attribute. So need to instead do this.
2021-01-19 12:16:20 -06:00
Justin DiRose 68a7243a66
FIX: Account for not having a unicode_title (#28)
Mistakenly forgot to check for presence of unicode title and use the appropriate one.
2021-01-18 12:17:29 -06: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
Justin DiRose cb7c12defe
FIX: Show unicode title in topic view (#26) 2021-01-13 13:27:10 -06:00
Justin DiRose a82db01108
FEATURE: Show topic title and category in site title (#25) 2021-01-13 13:26:52 -06:00
Osama Sayegh 25d3fbdfed
FIX: debounce search correctly (#24)
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2021-01-05 15:16:44 +03:00
Roman Rizzi 3da00ddaa1
DEV: Use the new discourseDebounce function wrapper. (#22)
We recently merged a Discourse core's PR to replace usages of Ember's debounce and discourseDebounce with a new debounce wrapper. The new wrapper works exactly like Ember's debounce but internally calls "run" when called in test mode.

This PR replaces all usages of other debounce functions with the new wrapper and fallbacks to Ember's debounce for backward-compatibility.
2020-12-22 14:45:33 -03:00
Justin DiRose 63a8181fa4
FIX: Results count not always properly shown (#21)
There was a weird case where when filtering topics by solved status did not properly show the count of filtered topics. I took this opportunity to lightly refactor the backend. There was a duplicate size operation when we searched and when calculating pagination. I've eliminated the second size call and refactored the front end to be a little bit simpler while solving the bug.
2020-12-01 13:51:42 -06:00
Jarek Radosz 019591c995
FIX: Don't overwrite Topic.category computed prop (#18)
Pre-loading/pre-assigning isn't necessary. `Topic.category` uses `Category.findById` which in turn uses an identity map, so there are no N+1 calls to the backend.
2020-11-11 22:14:38 +01:00
Mark VanLandingham 23ed78cc87
DEV: Use html-safe for no_topics translation (#17) 2020-11-11 09:01:59 -06:00
Justin DiRose dd55d165cd
FIX: Filters did not reset when visiting route (#14)
When using a single Ember route, the query param filters did not
properly reset when, for example, clicking the Knowledge Explorer link
in the hamburger menu.

This commit introduces a subroute where most of the logic takes place.
We needed a subroute so that refresh doesn't take out the entire UI part.
This allows us to use the `refreshModel` option for query params on the
route and remove the refresh controller action. Doing so also retains
state of the search field instead of fully reloading the parent route.
2020-11-04 12:02:05 -06:00
Justin DiRose aac4af9d96
DEV: Fix deprecated object creation methods (#13)
This commit makes sure we're using the up to date methods to create Ember classes and objects.
2020-10-27 11:31:09 -05:00
Justin DiRose bfc812ca9c
DEV: Linting 2020-10-06 12:36:08 -05:00
Justin DiRose e6e302782b
DEV: Add new plugin outlet 2020-10-06 12:13:31 -05:00
Justin DiRose e3be3fbb77
FEATURE: Add clear button to search bar
Previously you had to clear the search results out by deleting them.
This introduces a friendlier way to clear the search UX, especially if
you didn't find what you're looking for.
2020-10-06 12:08:28 -05:00
Justin DiRose 30aa6230c5
DEV: Add args to plugin outlet 2020-10-05 15:16:14 -05:00
Justin DiRose 0e1c7c7216
FEATURE: Add onebox metadata (#10)
Currently linking directly to Knowledge Explorer topics shows a generic onebox, which isn't super helpful in some cases.

This commit mimics how the theme creator plugin handles adding metadata to special occurrences. However, to get this to work, how the plugin handles showing topic contents needed to be refactored. Instead of hitting the existing topic route, the plugin implements its own version of this, including adding restrictions for topics that are not in a selected Knowledge Explorer category or tag.
2020-10-01 09:32:28 -05:00
jjaffeux 2c12f977ca REFACTOR: removes superfluous argument 2020-09-23 14:46:02 +02:00
jjaffeux 2a2e36bbe2 REFACTORING: replacing itself by itself is unecessary 2020-09-23 14:45:15 +02:00
jjaffeux 3ed54c273a DEV: linting 2020-09-22 17:12:39 +02:00
Joffrey JAFFEUX 8a5b3201b9
DEV: apply coding standards (#9) 2020-09-04 13:22:46 +02:00
Justin DiRose 2f59883fb6
FIX: Safari didn't like pointer-events without a block parent element 2020-08-05 15:51:00 -05:00
Justin DiRose 2ce61139e3
FIX: Don't allow pointer events on link children 2020-08-05 13:57:26 -05:00
Justin DiRose e51cde30b2
FIX: Future-proof selection of elements 2020-08-05 12:08:28 -05:00