This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Isaac Janzen 92bb728fe5
DEV: Add search suggestions for tag-intersections (#19777)
Added `tagIntersection` search context for handling search suggestions on tag intersection and tag+category routes.

# Tag & Category Route Search Suggestions
eg. /tags/c/general/5/updates
### Before
<img width="422" alt="Screenshot 2023-01-06 at 2 58 50 PM" src="https://user-images.githubusercontent.com/50783505/211098933-ade438c6-5008-49ce-9a90-c8200ec5fe00.png">

### After
<img width="359" alt="Screenshot 2023-01-06 at 3 00 35 PM" src="https://user-images.githubusercontent.com/50783505/211099183-c3feaeac-8661-47ed-843c-da9d9fb78e9e.png">

# Tag Intersection Route Search Suggestions
eg. /tags/intersection/updates/foo
### Before
<img width="421" alt="Screenshot 2023-01-06 at 3 02 23 PM" src="https://user-images.githubusercontent.com/50783505/211099435-e8fc6d87-2772-45b5-b455-1831f80eab3a.png">

### After
<img width="362" alt="Screenshot 2023-01-09 at 2 02 09 PM" src="https://user-images.githubusercontent.com/50783505/211397349-acb350f7-8e6a-4d9f-a749-8292e49400d9.png">

I defaulted to using `+` as a separator for tag intersections. The reasoning behind this is that we don't make the tag intersection routes easily accessible, so if you are going out of your way to view multiple tags, you are most likely going to be searching by **both** of those tags as well.

# General Search
Introducing flex wrap removes whitespace causing a [test](https://github.com/discourse/discourse/pull/19777/files#diff-5d3d13fabc1a511635eb7471ffe74f4d455d77f6984543c2be6ad136dfaa6d3aR813) to fail, but to remedy this I added spacing to the `.search-item-prefix` and `.search-item-slug` which achieves the same thing.

### After
<img width="359" alt="Screenshot 2023-01-09 at 2 04 54 PM" src="https://user-images.githubusercontent.com/50783505/211397900-60220394-5596-4e13-afd0-b6130afa0de2.png">
2023-01-11 13:02:22 -06:00
..
app DEV: Add search suggestions for tag-intersections (#19777) 2023-01-11 13:02:22 -06:00
config DEV: Remove deprecation config for ember-modifier (#19439) 2022-12-13 10:28:44 +00:00
lib DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
public/assets/scripts DEV: Enable @cached decorator for themes and plugins (#19261) 2022-11-30 15:53:54 +00:00
scripts DEV: Compile splash screen JS with ember-cli before inlining (#18150) 2022-09-01 09:58:48 +01:00
tests DEV: Add search suggestions for tag-intersections (#19777) 2023-01-11 13:02:22 -06:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Move the recently added dev-deps to deps (#19103) 2022-11-18 11:45:52 +01:00
jsconfig.json DEV: Add discourse/tests to jsconfig (#19031) 2022-11-15 11:33:56 +00:00
package.json Build(deps): Bump jsdom from 20.0.3 to 21.0.0 in /app/assets/javascripts (#19786) 2023-01-08 23:41:14 +01:00
testem.js DEV: Move shouldLoadPluginTestJs() (#19045) 2022-11-16 11:07:58 +01:00