Commit Graph

124 Commits

Author SHA1 Message Date
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 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 e51cde30b2
FIX: Future-proof selection of elements 2020-08-05 12:08:28 -05:00
Justin DiRose 80745b81c9
FIX: Improve topic link click handling
The way we were handling clicks were not always passing topic ids to the
model. This should improve the flow and make it more consistent.
2020-08-05 12:02:09 -05:00
Justin DiRose 13ab415fb0
DEV: Add plugin outlets 2020-08-04 15:17:12 -05:00
Justin DiRose 006a2eb418
FIX: Ensure list model is loaded
This fixes an edge case, such as when browsing directly into a topic in the
Knowledge Explorer view, where when you click the back button and the list
model is not generated.
2020-08-04 15:00:32 -05:00
Justin DiRose 699d057b94
FIX: Links were not clickable after load more
The event listener function was running on the incorrect lifecycle hook.
Should've been didRender.

This commit also fixes a small bug where in some cases the screen would
not scroll all the way to the top.
2020-07-27 11:22:28 -05:00
Justin DiRose 35d234a85a
FIX: Initializer needed to account for disabled plugin 2020-07-21 22:11:57 -05:00
Justin DiRose 3ec3a82dbf
FEATURE: Add keyboard shortcut to access docs 2020-07-21 22:04:41 -05:00
Justin DiRose 14861e3321
FEATURE: Move route to /docs
After further discussion about the route, we landed on /docs as a better
choice. This commit makes that change.
2020-07-14 10:07:18 -05:00
Justin DiRose 25ca793555
FEATURE: Move to '/e'
'/knowledge-explorer' was proving a bit too verbose, so we're changing
it to '/e'. The former route should redirect to the new one.
2020-07-13 10:23:21 -05:00
Justin DiRose 8d1c1fee3e
FIX: Empty solved filter was inescapable
When no solved topics were found in knowledge explorer, it would render an inescapable No Topics Found message. Well now there's a proper door.
2020-07-09 11:12:40 -05:00
Justin DiRose 6c1e565381
Prettier 2020-07-09 10:25:37 -05:00
Justin DiRose 7f44dfc84a
UX: Move solved filter behind plugin setting
On sites where solved is used but solved topics are not included in the knowledge explorer, having the filter caused issues.
2020-07-09 10:22:41 -05:00
Justin DiRose 90f8bdf945
PERF: Use DB for topic enumeration tasks (#7)
Use SQL statements versus loading topics into memory to allow handling of large datasets.
2020-06-16 13:20:08 -05:00
Justin DiRose 6eb3c7574d
FEATURE: Filter by solved 2020-06-15 14:16:57 -05:00
Justin DiRose 895fd41f39
FEATURE: Swap to raw for topic list (#6)
In order to get access to other topic list status icons (i.e. solved), we must use raw templates.
2020-06-12 12:55:10 -05:00
Justin DiRose 411a0b5dc6 DEV: Improve how topic status icons are handled 2020-05-28 09:58:47 -05:00
Justin DiRose 1850e3746a
FEATURE: Display if a topic is closed or unlisted 2020-05-13 10:04:12 -05:00
Joffrey JAFFEUX 0ed0c246ba
FIX: allows share-link to be used on knowledge topic (#5) 2020-04-03 13:04:13 -05:00
Vinoth Kannan cd3b58358e FIX: convert topic & post models to ember object. 2020-03-03 10:34:20 +05:30
Vinoth Kannan 09da5dd7bb UX: search input losing focus on text change event.
It causes issue while selecting the chinese (unicode) language words from autocomplete in windows 10.
2020-02-11 11:21:00 +05:30
Justin DiRose 73931cfaab FIX: Increase search debounce time
Needs more time to tolerate other language keyboards to process and
translate typing to unicode characters
2020-02-06 10:54:01 -06:00
Justin DiRose 2084327a2f FIX: Stop displaying empty topics message on empty search term
When no topics found with a search term and the search term was cleared,
the no topics error would show. This commit fixes that behavior by
putting the error inside the loading component.
2020-02-06 09:41:29 -06:00
Sam Saffron cf0d3d62c1 DEV: add class to distinguish hamburger link
Previously we only had a widget-link which was not enough
2020-01-28 18:18:02 +11:00
Joffrey JAFFEUX 36bf06f623 FIX: uses post widget to display topic post to allow decorateCooked (#4) 2019-11-27 09:27:07 +11:00
Justin DiRose ed709f8da1 FIX: Show correct text when no search results found 2019-11-18 12:05:25 -06:00
Justin DiRose 043e6447b0 UX: i18n text for topic list column headers 2019-11-18 11:10:05 -06:00
Justin DiRose 1dd582e1b1 FEATURE: Sorting per column on topic list 2019-11-18 11:03:49 -06:00
Sam Saffron 312cbf883e FIX: if search yields no results don't hide search box
This made it very hard to recover from a search yielding no results.
2019-11-18 16:15:01 +11:00
Sam Saffron a2fff39e6c FIX: reloading a page with a KB was not loading the topic 2019-11-14 11:49:18 +11:00
Justin DiRose 18c45a7a2b UX: Add message when no topics found in KE view 2019-11-13 15:52:33 -06:00
Justin DiRose 698218c37b DEV: Replace deprecated API calls 2019-11-13 14:39:48 -06:00
Kris 5e756f57da FEATURE: Collapsable filters on mobile 2019-11-08 16:07:44 -05:00
Justin DiRose 43bc28a198 Revert "FEATURE: Display oneboxed content in knowledge explorer topic view"
This reverts commit 89ef7c8133.
2019-11-08 12:50:07 -06:00
Justin DiRose 89ef7c8133 FEATURE: Display oneboxed content in knowledge explorer topic view 2019-11-08 11:42:07 -06:00
Kris 5389d58872 UX: Improving styles for narrow viewports, some general styling (#3) 2019-11-07 13:47:15 -06:00
Justin DiRose 10ec8b47a8 FEATURE: Category filtering 2019-11-06 11:27:30 -06:00
Justin DiRose 42ac7bb984 FEATURE: Add category to knowledge explorer topic list 2019-11-04 15:05:32 -06:00
Joffrey JAFFEUX 1c845cd517 REFACTOR: various refactorings/fixes (#2) 2019-11-04 08:49:22 +11:00
Justin DiRose a34e4468c1
REFACTOR: Handle queries in more robust, customizable way
* Create custom query lib file

* Get topic list by category

* Get topic list with both categories and tags

* Count tags and pass back to controller in object

* Filter topic list by param-passed tag list

* FIX: Correctly serialize topic list data

* Filter results by search term (title only

* Debug commit

* Working multi-tag filtering

* FIX: case insensitive search terms

* Begin refactor of front end for new api changes

* REFACTOR: Use model for refreshing data
Instead of just using a route, which introduces full page refreshes, use
the route to pull the data initially, then update it using a model as to
refresh only the relevant parts of the page.

* Working topic load

* FIX: Visual alignment

* Refactor tests to follow new patterns

* Fixes suggested by eviltrout

* FEATURE: Load more topics

* FIX: Paginate records on return to the front end in a better fashion

* FIX: Prevent loadMore while loading more

* Fix pagination of topics to truncate list properly

* Inherit rubocop from discourse

* Make rubocop happynated

* Set list to unordered
2019-10-31 15:09:50 -05:00
Justin DiRose 1257f133e4 FIX: Show knowledge explorer link only when plugin enabled 2019-10-04 11:09:31 -05:00
Justin DiRose 274e0134cc FEATURE: Add hamburger menu link 2019-10-03 13:57:45 -05:00
Justin DiRose 5d0da1fe0a Spec tests & minor refactors 2019-10-02 16:24:40 -05:00
Justin DiRose 1b9ea64f15 DEV: Improve patterns per feedback 2019-09-16 14:40:53 -05:00
Justin DiRose e2b6d2ddb5 FEATURE: View article OP in KE view
Output of topic OP to KE view

UI styles for OP view
2019-09-16 11:40:40 -05:00
Justin DiRose 948d8426ca DEV: Cleanup unused code 2019-09-13 13:56:32 -05:00
Justin DiRose 3af0fcb50b Desktop and mobile styling improvements 2019-09-13 13:43:23 -05:00
Justin DiRose 6057e054c4 REFACTOR: Complete filtering on back end for complexity purposes 2019-09-10 13:36:02 -05:00
Justin DiRose e7359a118b FIX: Missing count method for search results 2019-09-10 10:45:25 -05:00
Justin DiRose adc07ae8ad Beginnings of working search 2019-08-30 15:34:48 -05:00
Justin DiRose 4586b1992f FEATURE: UI for Search
This will need the knowledge explorer helper search term to make
searching a lot easier.
2019-08-21 21:13:49 -05:00
Justin DiRose e7d93aeca6 Filter tags and count off of filtered list 2019-07-26 11:14:55 -05:00
Justin DiRose 2c9b904e15 Working tag filtering of topics 2019-07-26 10:50:22 -05:00
Justin DiRose 9eb97cbb55 Clicking on tag adds/removes tag in query params 2019-07-21 11:41:04 -05:00
Justin DiRose 46820c070f Basic styling, set up query params 2019-07-14 16:31:29 -05:00
Justin DiRose af0243cee8 Increase specificity in passing properties 2019-07-14 14:21:53 -05:00
Justin DiRose d62e856fc5 FEATURE: Tags display on knowledge explorer 2019-07-03 10:26:28 -05:00
Justin DiRose 64555d5362 FIX: Object passed to Ember changed structure 2019-07-02 16:52:31 -05:00
Justin DiRose 0a39e3adcc FEATURE: Simple topic list display of KE items 2019-07-02 10:01:28 -05:00
Justin DiRose 03a85bb3d7 Fix routing for Ember 2019-07-02 09:20:51 -05:00