Skip to content

feat(site): Read users into basic UsersTable #981

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 26 commits into from
Apr 14, 2022
Merged

Conversation

presleyp
Copy link
Contributor

@presleyp presleyp commented Apr 12, 2022

AC:

  • /users should contain a header and a table
  • Header should list the total number of users
  • Table should have a User column containing the user avatar, username, and email address

The other columns and pagination will be done separately.

@presleyp presleyp requested a review from a team as a code owner April 12, 2022 17:51
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #981 (1cbc885) into main (42e9956) will increase coverage by 0.10%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##             main     #981      +/-   ##
==========================================
+ Coverage   66.62%   66.72%   +0.10%     
==========================================
  Files         249      255       +6     
  Lines       14686    14915     +229     
  Branches      135      136       +1     
==========================================
+ Hits         9784     9952     +168     
- Misses       3923     3964      +41     
- Partials      979      999      +20     
Flag Coverage Δ
unittest-go-macos-latest 53.81% <ø> (-0.11%) ⬇️
unittest-go-postgres- 66.44% <ø> (-0.15%) ⬇️
unittest-go-ubuntu-latest 56.41% <ø> (-0.09%) ⬇️
unittest-go-windows-2022 53.31% <ø> (?)
unittest-js 62.85% <84.61%> (+1.23%) ⬆️
Impacted Files Coverage Δ
site/src/AppRouter.tsx 0.00% <0.00%> (ø)
site/src/test_helpers/handlers.ts 22.58% <0.00%> (-1.56%) ⬇️
site/src/components/ErrorSummary/index.tsx 66.66% <50.00%> (+6.66%) ⬆️
site/src/pages/UsersPage/UsersPage.tsx 83.33% <83.33%> (ø)
site/src/xServices/users/usersXService.ts 85.71% <85.71%> (ø)
site/src/api/index.ts 65.00% <100.00%> (+2.83%) ⬆️
site/src/components/UsersTable/UsersTable.tsx 100.00% <100.00%> (ø)
site/src/pages/UsersPage/UsersPageView.tsx 100.00% <100.00%> (ø)
site/src/test_helpers/entities.ts 100.00% <100.00%> (ø)
site/src/xServices/StateContext.tsx 100.00% <100.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42e9956...1cbc885. Read the comment docs.

Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@presleyp presleyp requested a review from greyscaled April 13, 2022 20:13
Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with the suggestion and merge 🎉. I know it's listed as a merge conflict, but I ran it locally and it was a case of "yes I want both of these changes":

export interface Pager {
  total: number
}

export interface PagedUsers {
  page: UserResponse[]
  pager: Pager
}

export interface WorkspaceAutostartRequest {
  schedule: string
}

export interface WorkspaceAutostopRequest {
  schedule: string
}

I'm not sure why this is registering as a conflict, but I digress.

Awesome stuff!!

@presleyp presleyp merged commit 82275a8 into main Apr 14, 2022
@presleyp presleyp deleted the users-table/presleyp/592 branch April 14, 2022 17:57
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants