Commit Graph

16 Commits

Author SHA1 Message Date
Colin Adler 4b81cfaa0d
chore: switch from `yarn` to `pnpm` (#8822) 2023-08-02 13:28:16 -05:00
Bruno Quaresma 00cbb211b4
fix(site): show error when user exists (#8864) 2023-08-02 14:36:35 -03:00
Bruno Quaresma 8909110f58
fix(site): Fix template icon field validation (#7394) 2023-05-04 14:30:48 -03:00
Bruno Quaresma 17bb1a1ff1
chore(site): Upgrade storybook to 7.0.4 (#7127) 2023-04-13 21:36:20 +00:00
Kira Pilot 0171ccbf62
chore: forbid direct react import (#5658) 2023-01-10 13:30:48 -05:00
Ammar Bandukwala 85c679597c
site: reduce printWidth to 80 (#4437)
Resolves #4435
2022-10-10 10:33:35 -07:00
Bruno Quaresma 189c562826
chore: Use Vite instead of Webpack for development (#4156) 2022-09-23 15:22:48 -03:00
Bruno Quaresma 40c0fc285c
refactor: Remove users redirect to active filter (#4056) 2022-09-15 10:05:33 -03:00
Ammar Bandukwala 2ee6acb2ad
Upgrade frontend to React 18 (#3353)
Co-authored-by: Kira Pilot <kira.pilot23@gmail.com>
2022-08-22 15:42:06 -05:00
Abhineet Jain 82938944e7
refactor: update Prettier printWidth to 100 (#2684) 2022-06-27 10:53:44 -04:00
Presley Pizzo b4645b2d11
Clear error on cancel (#2107) 2022-06-07 11:02:20 -04:00
Kyle Carberry 0ac37b146d
feat: Add page titles (#2070) 2022-06-06 08:34:10 -05:00
Presley Pizzo bb400a4e82
fix: Show error message from backend on create existing user (#1964)
* Show error message from backend on create existing user

* Format
2022-06-01 15:52:54 -04:00
Asher 26b04cc96f
chore: switch to generated types (#1394)
* Make column renderer use the same type as its key

That way the renderer only takes `string` for example when rendering the
name field instead of `string | number` when the interface has some
fields that are strings and some fields are numbers.

This will be necessary when switching to generated types since some of
the fields are numbers (like the owner count on a template).

* Switch fully to generated types

In some places the organization ID is part of the URL but not part of
the request so I separated out the ID into a separate argument in the
relevant API functions.

Otherwise this was a straightforward replacement where I mostly only
needed to change some of the interface names (User instead of
UserResponse for example) and add a few missing but required properties.

I kind of winged the template form; I am not sure what the difference
between a template and template version is or why the latter comes
before the former so the form just returns all the data required to
create both.

* Delete handwritten types

Except for UserAgent which seems to be purely frontend and
ReconnectingPTYRequest which is not in codersdk so I am just leaving it
for now.

* Remove implemented omitempty as a future idea

This was implemented in 2d3dc436a8.

* Add missing optionalities to generated request interfaces
2022-05-12 10:01:28 -05:00
Presley Pizzo 34b91fd577
feat: add margins to pages (#1217)
* Add Margin, use constants

* Change throughout

* Add to a page, lint

* Format
2022-05-04 11:36:54 -04:00
Presley Pizzo c16f105727
feat: Create user page (#1197)
* Add button and route

* Hook up api

* Lint

* Add basic form

* Get users on page mount

* Make cancel work

* Creating -> idle bc users page refetches

* Import as TypesGen

* Handle api errors

* Lint

* Add handler

* Add FormFooter

* Add FullPageForm

* Lint

* Better form, error, stories

bug in formErrors story

* Make detail optional

* Use Language

* Remove detail prop

* Add back autoFocus

* Remove displayError, use displaySuccess

* Lint, export Language

* Tests - wip

* Fix cancel tests

* Switch back to mock

* Add navigate to xservice

Doesn't work in test

* Move error type predicate to xservice

* Lint

* Switch to using creation mode in XState

still problems in tests

* Lint

* Lint

* Lint

* Revert "Switch to using creation mode in XState"

This reverts commit cf8442fa4b.

* Give XService a navigate action

* Add missing validation messages

* Fix XState warning

* Fix tests

IRL is broken bc I need to send org id

* Pretend user has org id and make it work

* Format

* Lint

* Switch to org ids array

* Skip lines between tests

Co-authored-by: G r e y <grey@coder.com>

* Punctuate notification messages

Co-authored-by: G r e y <grey@coder.com>
2022-04-28 16:32:23 -04:00