Skip to content

refactor: Minor improvements and fixes for the page headers #4045

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 1 commit into from
Sep 14, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

What I made:

  • Reduced the title and subtitle font sizes
  • Make the title bold
  • Fixed the user search spacing
  • Fixed workspace icon alignment

Before:
Screen Shot 2022-09-13 at 16 06 11
Screen Shot 2022-09-13 at 16 06 21

After
Screen Shot 2022-09-13 at 16 06 03
Screen Shot 2022-09-13 at 16 06 30

@BrunoQuaresma BrunoQuaresma self-assigned this Sep 13, 2022
@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner September 13, 2022 19:10
@BrunoQuaresma BrunoQuaresma requested review from Kira-Pilot and removed request for a team September 13, 2022 19:10
color: theme.palette.text.secondary,
fontWeight: 400,
display: "block",
margin: 0,
marginTop: theme.spacing(1),
marginTop: ({ condensed }: { condensed?: boolean }) =>
condensed ? theme.spacing(0.5) : theme.spacing(1),
Copy link
Member

Choose a reason for hiding this comment

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

Condensed is a very specific prop to pass - is there a reason we don't just want to pass a more generic style prop and allows consumers to override however they want? Asking because I see we only used condensed in two places and curious if there's a theming rule we should be using going forward.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Asking because I see we only used condensed in two places and curious if there's a theming rule we should be using going forward.

Usually, when it has an Avatar on the side we want to decrease the space between the title and subtitle so they can look grouped since there is a third element.

Condensed is a very specific prop to pass - is there a reason we don't just want to pass a more generic style prop and allows consumers to override however they want?

I just found it easier to create a prop instead of defining the style in two places and also easier to follow and copy/paste the page header if we are going to use it with the Avatar in another place. I didn't have a better name, sorry, but I see MUI and Chakra use this kind of name when they want narrow spaces or margins.

Copy link
Member

Choose a reason for hiding this comment

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

That's fine and the name is good! I was just curious.

Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

Cute and clean!

@BrunoQuaresma BrunoQuaresma merged commit b20ecfd into main Sep 14, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/refactor-page-header branch September 14, 2022 14:04
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