Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds faceted search #261

Merged
merged 28 commits into from
Jan 23, 2021
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7f68609
packages aggs fields
garbas Dec 4, 2020
42c8c10
Merge remote-tracking branch 'origin/main' into faceted-search
garbas Dec 29, 2020
4f50c5b
initial work
garbas Jan 6, 2021
afc600d
Merge remote-tracking branch 'origin/main' into faceted-search
garbas Jan 6, 2021
521f770
working with only one selected bucket
garbas Jan 7, 2021
9355761
implement search in post_filter and show checkbox
garbas Jan 7, 2021
fb86e08
no need to lowercase since we already do this in edge
garbas Jan 9, 2021
b8b3f98
change how the packages/options are displayed
garbas Jan 11, 2021
b2b1d59
fix click on links
garbas Jan 11, 2021
3dcbd4d
faceted search trap click (#262)
turboMaCk Jan 17, 2021
65a739f
fix sorting problem
garbas Jan 17, 2021
48244cd
only open when clicked on the title of the result item
garbas Jan 17, 2021
01559c1
only show subset of platforms as before
garbas Jan 17, 2021
7a841b7
make it more obvious what each item in shortPackageDetails is
garbas Jan 17, 2021
3d8c18b
reset opened item when sort/bucket item is clicked
garbas Jan 17, 2021
fb18f67
whole result item no longer opens details
garbas Jan 17, 2021
1aabd79
use a (on hover) wedge to show/hide details
garbas Jan 17, 2021
9aec6be
show buckets even when there is no packages to list
garbas Jan 17, 2021
743844d
Apply "more link" on options and fix CSS issues (#264)
turboMaCk Jan 17, 2021
c909f6f
facet search update item hover interaction (#263)
turboMaCk Jan 17, 2021
67e2b63
Merge remote-tracking branch 'origin/main' into faceted-search
garbas Jan 20, 2021
64b07f9
off by one in "showing results"
garbas Jan 20, 2021
6ebeabb
typo
garbas Jan 20, 2021
da0d0c0
Bucket name doesn't display under X when bucket is selected
garbas Jan 23, 2021
f06a92f
Reset bucket selection when switching between channels
garbas Jan 23, 2021
1c910d3
Add "No packages set"/"No license"/"No maintainers" buckets
garbas Jan 23, 2021
ae8332b
Remove outline when button of result item is focused
garbas Jan 23, 2021
18ac389
Revert "Remove outline when button of result item is focused"
garbas Jan 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17
18
16 changes: 4 additions & 12 deletions import-scripts/import_scripts/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,42 +88,34 @@
},
"package_attr_name": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_attr_name_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_attr_name_query": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_attr_name_query_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_attr_set": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_attr_set_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_pname": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_pname_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"package_pversion": {"type": "keyword"},
Expand Down Expand Up @@ -151,6 +143,7 @@
"type": "nested",
"properties": {"fullName": {"type": "text"}, "url": {"type": "text"}},
},
"package_license_set": {"type": "keyword"},
"package_maintainers": {
"type": "nested",
"properties": {
Expand All @@ -159,29 +152,26 @@
"github": {"type": "text"},
},
},
"package_maintainers_set": {"type": "keyword"},
"package_platforms": {"type": "keyword"},
"package_position": {"type": "text"},
"package_homepage": {"type": "keyword"},
"package_system": {"type": "keyword"},
# Options fields
"option_name": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"option_name_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"option_name_query": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"option_name_query_reverse": {
"type": "keyword",
"normalizer": "lowercase",
"fields": {"edge": {"type": "text", "analyzer": "edge"}},
},
"option_description": {
Expand Down Expand Up @@ -492,7 +482,9 @@ def gen():
package_longDescription=package_longDescription,
package_longDescription_reverse=field_reverse(package_longDescription),
package_license=licenses,
package_license_set=[i["fullName"] for i in licenses],
package_maintainers=maintainers,
package_maintainers_set=[i["name"] for i in maintainers if i["name"]],
package_platforms=[i for i in platforms if i],
package_position=position,
package_homepage=data["meta"].get("homepage"),
Expand Down
4 changes: 2 additions & 2 deletions src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Page.Packages
import Route
import Search
import Url
import Url.Builder



Expand Down Expand Up @@ -129,6 +128,7 @@ attemptQuery (( model, _ ) as pair) =
(Maybe.withDefault "" searchModel.query)
searchModel.from
searchModel.size
searchModel.buckets
searchModel.sort
]
)
Expand Down Expand Up @@ -365,7 +365,7 @@ viewNavigation route =
f searchArgs

_ ->
f <| Route.SearchArgs Nothing Nothing Nothing Nothing Nothing Nothing
f <| Route.SearchArgs Nothing Nothing Nothing Nothing Nothing Nothing Nothing
in
li [] [ a [ href "https://nixos.org" ] [ text "Back to nixos.org" ] ]
:: List.map
Expand Down
Loading