Skip to content

chore(site): remove new filter from experimental #8112

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

Merged
merged 4 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
chore(site): remove new filter from experimental
  • Loading branch information
BrunoQuaresma committed Jun 20, 2023
commit d0b0f04a99ba3db047751676f4e74c91fd65d86e
6 changes: 2 additions & 4 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1704,9 +1704,6 @@ const (
// https://github.com/coder/coder/milestone/19
ExperimentWorkspaceActions Experiment = "workspace_actions"

// New workspace filter
ExperimentWorkspaceFilter Experiment = "workspace_filter"

// Add new experiments here!
// ExperimentExample Experiment = "example"
)
Expand All @@ -1715,9 +1712,7 @@ const (
// users to opt-in to via --experimental='*'.
// Experiments that are not ready for consumption by all users should
// not be included here and will be essentially hidden.
var ExperimentsAll = Experiments{
ExperimentWorkspaceFilter,
}
var ExperimentsAll = Experiments{}

// Experiments is a list of experiments that are enabled for the deployment.
// Multiple experiments may be enabled at the same time.
Expand Down
1 change: 0 additions & 1 deletion docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| ------------------- |
| `moons` |
| `workspace_actions` |
| `workspace_filter` |

## codersdk.Feature

Expand Down
8 changes: 2 additions & 6 deletions site/src/api/typesGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,12 +1342,8 @@ export const Entitlements: Entitlement[] = [
]

// From codersdk/deployment.go
export type Experiment = "moons" | "workspace_actions" | "workspace_filter"
export const Experiments: Experiment[] = [
"moons",
"workspace_actions",
"workspace_filter",
]
export type Experiment = "moons" | "workspace_actions"
export const Experiments: Experiment[] = ["moons", "workspace_actions"]

// From codersdk/deployment.go
export type FeatureName =
Expand Down
2 changes: 2 additions & 0 deletions site/src/components/Filter/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export const useFilter = ({
}
}

export type UseFilterResult = ReturnType<typeof useFilter>

const parseFilterQuery = (filterQuery: string): FilterValues => {
if (filterQuery === "") {
return {}
Expand Down
2 changes: 2 additions & 0 deletions site/src/components/Filter/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,5 @@ export const useFilterMenu = <TOption extends BaseOption = BaseOption>({
isSearching: searchOptionsQuery.isFetching,
}
}

export type UseFilterMenuResult = ReturnType<typeof useFilterMenu>
34 changes: 34 additions & 0 deletions site/src/components/Filter/storyHelpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { action } from "@storybook/addon-actions"
import { UseFilterResult } from "./filter"
import { UseFilterMenuResult } from "./menu"

export const MockMenu: UseFilterMenuResult = {
initialOption: undefined,
isInitializing: false,
isSearching: false,
query: "",
searchOptions: [],
selectedOption: undefined,
selectOption: action("selectOption"),
setQuery: action("updateQuery"),
}

export const getDefaultFilterProps = <TFilterProps>({
query = "",
values,
menus,
}: {
query?: string
values: Record<string, string | undefined>
menus: Record<string, UseFilterMenuResult>
}) =>
({
filter: {
query,
update: () => action("update"),
debounceUpdate: action("debounce") as UseFilterResult["debounceUpdate"],
used: false,
values,
},
menus,
} as TFilterProps)

This file was deleted.

This file was deleted.

Loading