-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Trash Usable - Search Filter UI (#42402)
* adds filtering for archived items on the search page * fix typing mistake
- Loading branch information
1 parent
1c3a6ee
commit 0e92c09
Showing
10 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
7 changes: 7 additions & 0 deletions
7
frontend/src/metabase/search/components/SearchResult/components/utils.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { WrappedResult } from "metabase/search/types"; | ||
|
||
import type { IconComponentProps } from "./ItemIcon"; | ||
|
||
export const isWrappedResult = ( | ||
item: IconComponentProps["item"], | ||
): item is WrappedResult => item && "getIcon" in item; |
This file contains 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
10 changes: 10 additions & 0 deletions
10
frontend/src/metabase/search/components/filters/IncludeTrashedItemsFilter.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { t } from "ttag"; | ||
|
||
import type { SearchFilterToggle } from "metabase/search/types"; | ||
|
||
export const SearchTrashedItemsFilter: SearchFilterToggle = { | ||
label: () => t`Search items in trash`, | ||
type: "toggle", | ||
fromUrl: value => value === "true", | ||
toUrl: (value: boolean) => (value ? "true" : null), | ||
}; |
10 changes: 10 additions & 0 deletions
10
frontend/src/metabase/search/components/filters/SearchTrashedItemsFilter.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { t } from "ttag"; | ||
|
||
import type { SearchFilterToggle } from "metabase/search/types"; | ||
|
||
export const SearchTrashedItemsFilter: SearchFilterToggle = { | ||
label: () => t`Search items in trash`, | ||
type: "toggle", | ||
fromUrl: value => value === "true", | ||
toUrl: (value: boolean) => (value ? "true" : null), | ||
}; |
This file contains 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
This file contains 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