Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: Load users from the API#1218

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 2 commits intomainfrombq/1216/load-users-from-the-api
Apr 29, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

Closes#1216

@BrunoQuaresmaBrunoQuaresma self-assigned thisApr 29, 2022
@BrunoQuaresmaBrunoQuaresma requested review frompresleyp anda team ascode ownersApril 29, 2022 14:16
@codecov
Copy link

codecovbot commentedApr 29, 2022
edited
Loading

Codecov Report

Merging#1218 (b6db33a) intomain (ba4c3ce) willincrease coverage by0.21%.
The diff coverage is81.81%.

@@            Coverage Diff             @@##             main    #1218      +/-   ##==========================================+ Coverage   65.45%   65.67%   +0.21%==========================================  Files         268      269       +1       Lines       17029    17338     +309       Branches      162      164       +2     ==========================================+ Hits        11147    11386     +239- Misses       4710     4764      +54- Partials     1172     1188      +16
FlagCoverage Δ
unittest-go-macos-latest52.82% <ø> (-0.06%)⬇️
unittest-go-postgres-64.75% <ø> (+0.15%)⬆️
unittest-go-ubuntu-latest55.39% <ø> (+0.15%)⬆️
unittest-go-windows-202252.49% <ø> (+0.02%)⬆️
unittest-js68.87% <81.81%> (+0.02%)⬆️
Impacted FilesCoverage Δ
site/src/testHelpers/entities.ts100.00% <ø> (ø)
site/src/pages/UsersPage/UsersPage.tsx75.00% <50.00%> (-7.36%)⬇️
site/src/api/index.ts65.30% <100.00%> (ø)
site/src/pages/UsersPage/UsersPageView.tsx100.00% <100.00%> (ø)
site/src/testHelpers/handlers.ts37.14% <100.00%> (+5.71%)⬆️
site/src/xServices/users/usersXService.ts80.00% <100.00%> (-1.25%)⬇️
coderd/rbac/authz.go55.31% <0.00%> (-13.11%)⬇️
coderd/httpapi/httpapi.go66.25% <0.00%> (-6.25%)⬇️
provisioner/echo/serve.go54.40% <0.00%> (-2.40%)⬇️
peer/channel.go83.81% <0.00%> (-1.74%)⬇️
... and17 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updateba4c3ce...b6db33a. Read thecomment docs.


if (!users) {
return <FullScreenLoader />
}
Copy link
Contributor

@presleyppresleypApr 29, 2022
edited
Loading

Choose a reason for hiding this comment

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

We avoid early return on the frontend (it's a newish decision)

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'm not sure what early return means... but in case there are no users, during the initial load, what should we do instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, your content is fine, I just mean please useelse to connect the conditions.

BrunoQuaresma reacted with thumbs up emoji
Copy link
CollaboratorAuthor

@BrunoQuaresmaBrunoQuaresmaApr 29, 2022
edited
Loading

Choose a reason for hiding this comment

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

Ahh, ok. I will do that but I'm curious about the reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure - the idea is that usingelse makes it clear that the line of code you're reading is only executed conditionally. Withoutelse, the fact that the line is conditional is only represented by an apparently unrelatedif that happens to containreturn. So it's easier to misunderstand when maintaining the code.

BrunoQuaresma reacted with thumbs up emoji
@presleyp
Copy link
Contributor

@Emyrk just confirming there's no pager

@BrunoQuaresma
Copy link
CollaboratorAuthor

@presleyp we removed the pagination on the backend for now. Here is the discussion:https://codercom.slack.com/archives/C01A9SEKFEE/p1651240046986249

presleyp reacted with thumbs up emoji

@BrunoQuaresmaBrunoQuaresma merged commit021e4cd intomainApr 29, 2022
@BrunoQuaresmaBrunoQuaresma deleted the bq/1216/load-users-from-the-api branchApril 29, 2022 18:59
@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@presleyppresleyppresleyp approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

Load users from the API
3 participants
@BrunoQuaresma@presleyp@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp