Skip to content

Commit cf8500f

Browse files
BrunoQuaresmaammario
authored andcommitted
refactor(site): Improve workspaces filtering (coder#7681)
1 parent 58adc7d commit cf8500f

File tree

29 files changed

+1148
-183
lines changed

29 files changed

+1148
-183
lines changed

coderd/apidoc/docs.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,6 +1682,9 @@ const (
16821682
// https://github.com/coder/coder/milestone/19
16831683
ExperimentWorkspaceActions Experiment = "workspace_actions"
16841684

1685+
// New workspace filter
1686+
ExperimentWorkspaceFilter Experiment = "workspace_filter"
1687+
16851688
// Add new experiments here!
16861689
// ExperimentExample Experiment = "example"
16871690
)

docs/api/schemas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,6 +2561,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
25612561
| ------------------- |
25622562
| `moons` |
25632563
| `workspace_actions` |
2564+
| `workspace_filter` |
25642565

25652566
## codersdk.Feature
25662567

site/.eslintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ rules:
136136
"object-curly-spacing": "off"
137137
react-hooks/exhaustive-deps: warn
138138
react-hooks/rules-of-hooks: error
139+
react/display-name: "off"
139140
react/jsx-no-script-url:
140141
- error
141142
- - name: Link

site/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
"@testing-library/user-event": "14.4.3",
112112
"@types/jest": "29.4.0",
113113
"@types/node": "14.18.22",
114-
"@types/react": "18.0.15",
115-
"@types/react-dom": "18.0.6",
114+
"@types/react": "18.2.6",
115+
"@types/react-dom": "18.2.4",
116116
"@types/react-helmet": "6.1.5",
117117
"@types/react-syntax-highlighter": "15.5.5",
118118
"@types/react-virtualized-auto-sizer": "1.0.1",
File renamed without changes.

site/src/@types/i18n.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import "i18next"
2+
3+
// https://github.com/i18next/react-i18next/issues/1543#issuecomment-1528679591
4+
declare module "i18next" {
5+
interface TypeOptions {
6+
returnNull: false
7+
allowObjectInHTMLChildren: false
8+
}
9+
export function t<T>(s: string): T
10+
}
File renamed without changes.

site/src/api/errors.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export const isApiValidationError = (error: unknown): error is ApiError => {
3434
return isApiError(error) && hasApiFieldErrors(error)
3535
}
3636

37+
export const hasError = (error: unknown) =>
38+
error !== undefined && error !== null
39+
3740
export const mapApiErrorToFieldErrors = (
3841
apiErrorResponse: ApiErrorResponse,
3942
): FieldErrors => {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy