Skip to content

Commit bce8a98

Browse files
chore(site): remove new filter from experimental (#8112)
1 parent cc17d2f commit bce8a98

21 files changed

+120
-501
lines changed

coderd/apidoc/docs.go

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+2-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -1704,9 +1704,6 @@ const (
17041704
// https://github.com/coder/coder/milestone/19
17051705
ExperimentWorkspaceActions Experiment = "workspace_actions"
17061706

1707-
// New workspace filter
1708-
ExperimentWorkspaceFilter Experiment = "workspace_filter"
1709-
17101707
// Add new experiments here!
17111708
// ExperimentExample Experiment = "example"
17121709
)
@@ -1715,9 +1712,7 @@ const (
17151712
// users to opt-in to via --experimental='*'.
17161713
// Experiments that are not ready for consumption by all users should
17171714
// not be included here and will be essentially hidden.
1718-
var ExperimentsAll = Experiments{
1719-
ExperimentWorkspaceFilter,
1720-
}
1715+
var ExperimentsAll = Experiments{}
17211716

17221717
// Experiments is a list of experiments that are enabled for the deployment.
17231718
// Multiple experiments may be enabled at the same time.

docs/api/schemas.md

-1
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
24902490
| ------------------- |
24912491
| `moons` |
24922492
| `workspace_actions` |
2493-
| `workspace_filter` |
24942493

24952494
## codersdk.Feature
24962495

site/src/api/typesGenerated.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1344,12 +1344,8 @@ export const Entitlements: Entitlement[] = [
13441344
]
13451345

13461346
// From codersdk/deployment.go
1347-
export type Experiment = "moons" | "workspace_actions" | "workspace_filter"
1348-
export const Experiments: Experiment[] = [
1349-
"moons",
1350-
"workspace_actions",
1351-
"workspace_filter",
1352-
]
1347+
export type Experiment = "moons" | "workspace_actions"
1348+
export const Experiments: Experiment[] = ["moons", "workspace_actions"]
13531349

13541350
// From codersdk/deployment.go
13551351
export type FeatureName =

site/src/components/Filter/filter.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export const useFilter = ({
7474
}
7575
}
7676

77+
export type UseFilterResult = ReturnType<typeof useFilter>
78+
7779
const parseFilterQuery = (filterQuery: string): FilterValues => {
7880
if (filterQuery === "") {
7981
return {}

site/src/components/Filter/menu.ts

+2
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ export const useFilterMenu = <TOption extends BaseOption = BaseOption>({
101101
isSearching: searchOptionsQuery.isFetching,
102102
}
103103
}
104+
105+
export type UseFilterMenuResult = ReturnType<typeof useFilterMenu>
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { action } from "@storybook/addon-actions"
2+
import { UseFilterResult } from "./filter"
3+
import { UseFilterMenuResult } from "./menu"
4+
5+
export const MockMenu: UseFilterMenuResult = {
6+
initialOption: undefined,
7+
isInitializing: false,
8+
isSearching: false,
9+
query: "",
10+
searchOptions: [],
11+
selectedOption: undefined,
12+
selectOption: action("selectOption"),
13+
setQuery: action("updateQuery"),
14+
}
15+
16+
export const getDefaultFilterProps = <TFilterProps>({
17+
query = "",
18+
values,
19+
menus,
20+
}: {
21+
query?: string
22+
values: Record<string, string | undefined>
23+
menus: Record<string, UseFilterMenuResult>
24+
}) =>
25+
({
26+
filter: {
27+
query,
28+
update: () => action("update"),
29+
debounceUpdate: action("debounce") as UseFilterResult["debounceUpdate"],
30+
used: false,
31+
values,
32+
},
33+
menus,
34+
} as TFilterProps)

site/src/components/SearchBarWithFilter/SearchBarWithFilter.stories.tsx

-47
This file was deleted.

site/src/components/SearchBarWithFilter/SearchBarWithFilter.test.tsx

-26
This file was deleted.

0 commit comments

Comments
 (0)