Skip to content
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

refactor: Update users page to looks like others #1850

Merged
merged 4 commits into from
May 27, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented May 27, 2022

  • Remove the "Users" header
  • Remove the old header component because it is not used anymore. We probably want to create a new one.
  • Extract the "Avatar data" logic into the AvatarData component so we can keep it consistent between templates, workspaces, and users' views.

Screen Shot 2022-05-27 at 13 10 20

@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner May 27, 2022 16:10
@BrunoQuaresma BrunoQuaresma self-assigned this May 27, 2022
link?: string
}

export const AvatarData: React.FC<AvatarDataProps> = ({ title, subtitle, link }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't find a better name for it 😓

Copy link
Member

Choose a reason for hiding this comment

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

Seems fine!

"& .MuiSelect-root": {
// Adjusting padding because it does not have label
paddingTop: theme.spacing(1.5),
paddingBottom: theme.spacing(1.5),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added these because the select when there is no label is very BIG.

@@ -61,3 +72,16 @@ export const UsersPageView: React.FC<UsersPageViewProps> = ({
</Stack>
)
}

const useStyles = makeStyles((theme) => ({
actions: {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is probably something we want to extract as well.

link?: string
}

export const AvatarData: React.FC<AvatarDataProps> = ({ title, subtitle, link }) => {
Copy link
Member

Choose a reason for hiding this comment

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

Seems fine!

expect(rows).toHaveLength(MockBuilds.length)

// Wait for the results to be loaded
await waitFor(async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why, but this test should had fail before since it was "wrong"

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) May 27, 2022 16:37
@BrunoQuaresma BrunoQuaresma merged commit 7eacab8 into main May 27, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/update-user-page branch May 27, 2022 16:47
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.

None yet

2 participants