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

EuiHeaderSection side='right' now seems to rely on the presence of EuiHeaderBreadcrumbs #1390

Closed
gjones opened this issue Dec 20, 2018 · 4 comments
Labels

Comments

@gjones
Copy link
Contributor

gjones commented Dec 20, 2018

Hi all,
I was just updating Cloud from 5.3.0 to 5.8.1 and ran into a problem with how the EuiHeader was rendering.

The problem is that the <EuiHeaderSection side='right'> no longer aligns to the right. See image below (where profile image item should be on the right of the screen):
screenshot 2018-12-19 at 20 22 59

I've tracked the issue down to here #1346. In Cloud I was able to 'fix' the alignment by adding a valid EuiHeaderBreadcrumbs tag between the two EuiHeaderSection. So I think that the issue is that when the EuiHeaderBreadcrumbs tag is not present, <EuiHeaderSection side='right'> is not honoured.

I was able to recreate this in the EUI docs by removing EuiHeaderBreadcrumbs from the header demo, here's the result.

screenshot 2018-12-19 at 20 20 22

Thanks!

cc @cchaos

@gjones gjones added the bug label Dec 20, 2018
@cchaos
Copy link
Contributor

cchaos commented Dec 20, 2018

Ugh, sorry about that @gjones. I didn't test what would happen without breadcrumbs. I'll get a fix in.

@cchaos
Copy link
Contributor

cchaos commented Dec 20, 2018

Oh @gjones, so the problem I ran into is that I couldn't necessarily determine how many sections a consumer might add, so the way I actually solved this was by adding a new prop of grow to EuiHeaderSection.

If you set the left section to be: <EuiHeaderSection grow={true}> it will take up most of the space, pushing the right section to the right.

screen shot 2018-12-20 at 11 38 41 am

@gjones
Copy link
Contributor Author

gjones commented Dec 20, 2018

@cchaos ah perfect, I should have tried that, thank you!

@cchaos
Copy link
Contributor

cchaos commented Dec 20, 2018

Glad it worked!

@cchaos cchaos closed this as completed Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants