Skip to content

chore(site): remove xstate #10659

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 33 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3c99474
Remove template deprecation warning
BrunoQuaresma Nov 9, 2023
878f995
Move deployment values fetching
BrunoQuaresma Nov 9, 2023
cdf8859
Remove unused code from template warning
BrunoQuaresma Nov 9, 2023
964c3d2
Extract initial data
BrunoQuaresma Nov 9, 2023
2cd9de1
Move quota fetching to be used close to where it is used
BrunoQuaresma Nov 9, 2023
4fd62bb
Fix test on Terminal because of workspace query changes
BrunoQuaresma Nov 9, 2023
168024d
Merge branch 'main' of https://github.com/coder/coder into bq/refacto…
BrunoQuaresma Nov 13, 2023
b6ee59a
Move can suto start to be on WorkspaceReadyPage
BrunoQuaresma Nov 13, 2023
2388cae
Extract ssh config
BrunoQuaresma Nov 13, 2023
3d96b94
Extract watching workspace out of xstate
BrunoQuaresma Nov 13, 2023
b0fba32
Remove unused code
BrunoQuaresma Nov 13, 2023
9edfd71
Organize code on ready page
BrunoQuaresma Nov 13, 2023
3e1de93
Extract change version from xstate
BrunoQuaresma Nov 13, 2023
ab8977c
Extract update workspace
BrunoQuaresma Nov 13, 2023
cb2c966
Extract delete
BrunoQuaresma Nov 13, 2023
6c8ec9f
Extract activate
BrunoQuaresma Nov 13, 2023
039f4bb
Remove unecessary require permission
BrunoQuaresma Nov 13, 2023
987f14f
Remove unused RequirePermission usage
BrunoQuaresma Nov 13, 2023
13e954f
Extract refresh timeline
BrunoQuaresma Nov 13, 2023
764f047
Remove REFRESH_WORKSPACE
BrunoQuaresma Nov 13, 2023
633c431
Extract stop
BrunoQuaresma Nov 13, 2023
20e073f
Extract start
BrunoQuaresma Nov 13, 2023
bfcc99d
Extract cancellation and remove xservices
BrunoQuaresma Nov 13, 2023
cf6896a
Clean up
BrunoQuaresma Nov 13, 2023
b6c9469
Add retry with debug
BrunoQuaresma Nov 13, 2023
a4a33f9
Remove XState
BrunoQuaresma Nov 13, 2023
e72abf5
Merge branch 'main' of https://github.com/coder/coder into bq/refacto…
BrunoQuaresma Nov 14, 2023
75d39a2
Clean up event source
BrunoQuaresma Nov 14, 2023
c3de809
Rename workspace mutations
BrunoQuaresma Nov 14, 2023
477b928
Invalidate workspace builds data on cancel
BrunoQuaresma Nov 14, 2023
d189c20
use useEffectEvent to avoid unecessary updates
BrunoQuaresma Nov 14, 2023
49b95a2
Merge branch 'main' of https://github.com/coder/coder into bq/refacto…
BrunoQuaresma Nov 14, 2023
6cc257a
Fix cancel action
BrunoQuaresma Nov 14, 2023
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
4 changes: 0 additions & 4 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ updates:
xterm:
patterns:
- "xterm*"
xstate:
patterns:
- "xstate"
- "@xstate*"
mui:
patterns:
- "@mui*"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ yarn-error.log

# Front-end ignore patterns.
.next/
site/**/*.typegen.ts
site/build-storybook.log
site/coverage/
site/storybook-static/
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ yarn-error.log

# Front-end ignore patterns.
.next/
site/**/*.typegen.ts
site/build-storybook.log
site/coverage/
site/storybook-static/
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@
"wsconncache",
"wsjson",
"xerrors",
"xstate",
"yamux"
],
"cSpell.ignorePaths": ["site/package.json", ".vscode/settings.json"],
Expand Down
9 changes: 1 addition & 8 deletions docs/contributing/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ important ones:
- [react-router](https://reactrouter.com/en/main) for routing
- [TanStack Query v4](https://tanstack.com/query/v4/docs/react/overview) for
fetching data
- [XState](https://xstate.js.org/docs/) for handling complex state flows
- [axios](https://github.com/axios/axios) as fetching lib
- [Playwright](https://playwright.dev/) for end-to-end (E2E) testing
- [Jest](https://jestjs.io/) for integration testing
Expand Down Expand Up @@ -96,13 +95,7 @@ a `*.stories.ts` file.

We use
[TanStack Query v4](https://tanstack.com/query/v4/docs/react/overview)(previously
known as react-query) to fetch data from the API. We also use
[XState](https://xstate.js.org/docs/) to handle complex flows with multiple
states and transitions.

> ℹ️ We recently changed how we are going to fetch data from the server so you
> will see a lot of fetches being made using XState machines but feel free to
> refactor it if you are already touching those files.
known as react-query) to fetch data from the API.

### Where to fetch data

Expand Down
1 change: 0 additions & 1 deletion site/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ yarn-error.log

# Front-end ignore patterns.
.next/
**/*.typegen.ts
build-storybook.log
coverage/
storybook-static/
Expand Down
1 change: 0 additions & 1 deletion site/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ yarn-error.log

# Front-end ignore patterns.
.next/
**/*.typegen.ts
build-storybook.log
coverage/
storybook-static/
Expand Down
10 changes: 2 additions & 8 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
"private": true,
"license": "AGPL-3.0",
"scripts": {
"postinstall": "pnpm typegen",
"build": "NODE_ENV=production pnpm vite build",
"check:all": "pnpm format:check && pnpm lint && pnpm test",
"chromatic": "chromatic",
"dev": "vite",
"format:check": "prettier --cache --check '../**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'",
"format:write": "prettier --cache --write '../**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'",
"format:write:only": "prettier --cache --write",
"lint": "pnpm typegen && pnpm run lint:types && pnpm exec jest --selectProjects lint",
"lint": "pnpm run lint:types && pnpm exec jest --selectProjects lint",
"lint:fix": "FIX=true pnpm lint",
"lint:types": "tsc --noEmit",
"playwright:install": "playwright install --with-deps chromium",
Expand All @@ -25,9 +24,8 @@
"test:ci": "jest --selectProjects test --silent",
"test:coverage": "jest --selectProjects test --collectCoverage",
"test:watch": "jest --selectProjects test --watch",
"typegen": "xstate typegen 'src/**/*.ts'",
"stats": "STATS=true pnpm build && npx http-server ./stats -p 8081 -c-1",
"deadcode": "ts-prune | grep -v \".stories\\|.typegen\\|.config\\|e2e\\|__mocks__\\|used in module\\|testHelpers\\|typesGenerated\" || echo \"No deadcode found.\""
"deadcode": "ts-prune | grep -v \".stories\\|.config\\|e2e\\|__mocks__\\|used in module\\|testHelpers\\|typesGenerated\" || echo \"No deadcode found.\""
},
"dependencies": {
"@emoji-mart/data": "1.1.2",
Expand All @@ -46,8 +44,6 @@
"@mui/system": "5.14.0",
"@mui/utils": "5.14.11",
"@vitejs/plugin-react": "4.1.0",
"@xstate/inspect": "0.8.0",
"@xstate/react": "3.2.1",
"ansi-to-html": "0.7.2",
"axios": "1.6.0",
"canvas": "2.11.0",
Expand Down Expand Up @@ -94,7 +90,6 @@
"unique-names-generator": "4.7.1",
"uuid": "9.0.0",
"vite": "4.5.0",
"xstate": "4.38.1",
"xterm": "5.2.0",
"xterm-addon-canvas": "0.5.0",
"xterm-addon-fit": "0.8.0",
Expand Down Expand Up @@ -138,7 +133,6 @@
"@types/uuid": "9.0.2",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@xstate/cli": "0.5.2",
"chromatic": "7.6.0",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
Expand Down
149 changes: 0 additions & 149 deletions site/pnpm-lock.yaml

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

Loading