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

[Emotion] Convert EuiHeader and EuiHeaderLogo #6878

Merged
merged 15 commits into from
Jul 3, 2023
Merged
10 changes: 3 additions & 7 deletions src-docs/src/views/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,10 @@ const HeaderUserMenu = () => {
isOpen={isOpen}
anchorPosition="downRight"
closePopover={closeMenu}
panelPaddingSize="none"
panelPaddingSize="m"
>
<div style={{ width: 320 }}>
<EuiFlexGroup
gutterSize="m"
className="euiHeaderProfile"
responsive={false}
>
<div style={{ width: 300 }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the change from width: 320 to width: 300 intentional? I see it in header/header_alert.tsx as well but just wanted to be sure.

Copy link
Contributor Author

@cee-chen cee-chen Jul 3, 2023

Choose a reason for hiding this comment

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

Yes, this was intentional and was caused by the removed .euiHeaderProfile className below. That class was setting some padding, but could have been replaced by panelPaddingSize without requiring custom CSS. Doing so means there's extra width now however, so I reduced it slightly to a nice round number.

The width honestly doesn't really matter and is just an implementation detail/example - it also only affects this specific example and not consumer usage.

<EuiFlexGroup gutterSize="m" responsive={false}>
<EuiFlexItem grow={false}>
<EuiAvatar name="John Username" size="xl" />
</EuiFlexItem>
Expand Down
10 changes: 3 additions & 7 deletions src-docs/src/views/header/header_alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,10 @@ const HeaderUserMenu = () => {
isOpen={isOpen}
anchorPosition="downRight"
closePopover={closeMenu}
panelPaddingSize="none"
panelPaddingSize="m"
>
<div style={{ width: 320 }}>
<EuiFlexGroup
gutterSize="m"
className="euiHeaderProfile"
responsive={false}
>
<div style={{ width: 300 }}>
<EuiFlexGroup gutterSize="m" responsive={false}>
<EuiFlexItem grow={false}>
<EuiAvatar name="John Username" size="xl" />
</EuiFlexItem>
Expand Down
3 changes: 0 additions & 3 deletions src/components/header/_header_profile.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/components/header/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import 'mixins';

@import 'header';
@import 'header_profile';
@import 'header_links/index';
@import 'header_logo';
@import 'header_alert/index';
Expand Down