Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: Update users page to looks like others#1850

Merged
BrunoQuaresma merged 4 commits into
mainfrom
bq/update-user-page
May 27, 2022
Merged

refactor: Update users page to looks like others#1850
BrunoQuaresma merged 4 commits into
mainfrom
bq/update-user-page

Conversation

@BrunoQuaresma
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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.

}

const useStyles = makeStyles((theme) => ({
actions: {
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor Author

@BrunoQuaresma BrunoQuaresma May 27, 2022

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.

2 participants