Commit Graph

21 Commits

Author SHA1 Message Date
24ec05b5c5 chore: bump prettier from 2.8.1 to 3.0.0 in /site (#8477)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cian Johnston <cian@coder.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2023-07-13 14:44:12 +03:00
f0bd258ff1 feat: move proxy settings page to deployment options (#8246)
* feat: Move workspace proxy page to deployment options

Workspace proxy settings page is now an admin feature

* WorkspaceProxy response extends region
2023-06-30 11:32:35 -04:00
b32ed2d97e chore: add function to refetch latencies to ProxyContext (#7769)
* Allow refetching of proxy latencies
* Pass refetch funtion up the context stack
* Add to menu bar
2023-06-01 13:37:20 +00:00
b8c07ff014 feat: Auto select workspace proxy based on lowest latency (#7515)
* feat: Proxy auto select and user selection state
* chore: Auto select based on latency
* Add extra test for unknown latencies
* Mock latencies for unit tests
2023-05-22 16:56:41 +02:00
8f768f8276 feat: Workspace Proxy picker show latency to each proxy (#7486)
* chore: Add cors to workspace proxies to allow for latency checks
* Add latency check to wsproxy

Use performance API timings.
- Fix cors and timing headers
- Accept custom headers
2023-05-11 15:42:30 -05:00
813b54942f chore(site): Make FE tests faster (#6543) 2023-03-13 13:35:09 -03:00
136f23fb4c refactor(site): Suport template version variables on template creation (#6434) 2023-03-06 18:36:19 +00:00
909fbb6d2c fix(site): Upload template files on template version editor (#6222) 2023-02-16 13:59:48 -03:00
2117eb4f31 chore: Improve bundle size (#5761) 2023-01-18 17:31:31 +00:00
6252f782d8 fix: Setup redirect state (#5759) 2023-01-18 15:28:46 +00:00
85c679597c site: reduce printWidth to 80 (#4437)
Resolves #4435
2022-10-10 10:33:35 -07:00
ce953441fb refactor: clean up types in jest.setup.ts (#4285) 2022-10-04 09:04:23 -07:00
9775228b00 fix: call testing lib cleanup afterEach test (#4232) 2022-09-27 16:27:42 -07:00
82938944e7 refactor: update Prettier printWidth to 100 (#2684) 2022-06-27 10:53:44 -04:00
cfa316be89 fix: incomplete message when intercepting console logger (#1875)
I was getting a message like "Warning: Failed type %s: %s%s".
2022-05-27 17:16:19 -05:00
cf5aca799d Add reset user password action (#1320) 2022-05-06 13:23:03 -05:00
f911c8a781 feat: Add suspend user action (#1275) 2022-05-04 16:10:38 +00:00
b9933d493a refactor: camel case files (#1081) 2022-04-19 11:18:12 -05:00
88e30bec55 feat: add the preferences/account page (#999) 2022-04-15 13:17:50 -04:00
22f820c69b refactor(site): replace UserContext with userXService (#465)
* Install and configure XState

* userXService - typegen not working yet

* Lint, fix error transitions

* Lint

* Change initial state to handle loss of state

* Fix gitignore

* Fix types by hook or by crook

* Use xservice in all pages

* Glue/visual component separation

* Fix dependency merge

* Lint

* Remove UserContext

* Remove inspector

* Add typegen command to site/out

* Fix index page redirects

* DRY up nav and redirects

* Moves based on merge

* Moving Page helpers into Page dir

* Move xservice into src, update script

* Move and storybook navbarview

* Update docs

* Install MSW

* Reorganization, with apologies

* Missed spots

* Add mock handlers

* Configure jest for msw

* Fix typos

* Shift unit test to NavbarView

* Fix test types

* Rename NavbarView test

* Attempt at test, wip

* Fix config

* Be logged out, only warn

* Conditionally show text to help test

* Use a Context for MSW's sake

* mocks -> test_helpers

* Enable dev tools

* Format

* Fix import

* Fixes

* Lint

* run typegen postinstall

Co-authored-by: Bryan Phelps <bryan@coder.com>
2022-03-18 14:07:08 -04:00
edd8345658 fix: UX - Error logs in development from Empty state component (#466)
Fixes #452 

When the empty state is rendered with a non-textual element (which it turns out all our current empty states are, because they have a `<button />` component as a call to action), this noisy error log was showing up in the `console`:

```
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
    at div
    at div
    at p
    at Typography (webpack-internal:///./node_modules/@material-ui/core/esm/Typography/Typography.js:166:28)
    at WithStyles (webpack-internal:///./node_modules/@material-ui/styles/esm/withStyles/withStyles.js:64:31)
    at div
    at StyledComponent (webpack-internal:///./node_modules/@material-ui/styles/esm/styled/styled.js:95:28)
    at EmptyState (webpack-internal:///./src/components/EmptyState/index.tsx:47:25)
...
    at ProjectsPage (webpack-internal:///./src/pages/projects/index.tsx:37:18)
    at Routes (webpack-internal:///./node_modules/react-router/index.js:275:5)
    at ThemeProvider (webpack-internal:///./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js:44:24)
    at UserProvider (webpack-internal:///./src/contexts/UserContext.tsx💯55)
    at SWRConfig$1 (webpack-internal:///./node_modules/swr/dist/index.esm.js:501:23)
    at Router (webpack-internal:///./node_modules/react-router/index.js:209:15)
    at BrowserRouter (webpack-internal:///./node_modules/react-router-dom/index.js:118:5)
    at App
 ```

The issue was that the `description` prop could either be a `string` or an actual `React` component, but was always rendered as a child of a `<Typography />` component. The `<Typography>` component internally renders as a `<p>`, which is not valid to nest `<div>`s inside.

The fix is to not nest inside a `<Typography />` block, but an actual `<div />`.
2022-03-16 20:17:41 -07:00