This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Search: restore snippets to filters sidebar#63587
Merged
camdencheek merged 17 commits intomainfrom Jul 8, 2024
Merged
Conversation
b08058c to
4ce4f7c
Compare
fkling
approved these changes
Jul 3, 2024
| $: groupedSelectedFilters = Object.groupBy(selectedFilters, ({ kind }) => kind) | ||
|
|
||
| let groupedStreamFilters: Partial<Record<SectionKind, StreamFilter[]>> | ||
| $: groupedStreamFilters = Object.groupBy(streamFilters, ({ kind }) => kind) |
Contributor
There was a problem hiding this comment.
Object.groupBy is relatively new. Not sure about our browser compatibility strategy though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds snippets back to the search sidebar, which got missed when it was redesigned.
This includes some refactoring of the Svelte version to account for filter types that do not match 1:1 with the backend types. We initially tried to tie them tightly with the backend types so the backend is the source of truth, but I think we want to have the ability to introduce client-side-only filters, which we already sorta hackily do with the
type:filters. And it's even more hacky with thecount:filter in the React webapp (which doesn't look like it was ever implemented in the Svelte version).In the React app, I made the minimum changes to get this working (no associated refactoring).
Fixes SRCH-580
Test plan
Added a couple of simple playwright tests. Manually tested that:
Changelog