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

Offset negative margin for max width inside container for super date picker #2236

Conversation

shahzad31
Copy link
Contributor

Summary

resolves #2225

EuiSuperDatePicker when used inside full width FlexBox Group is leaving margin like in example below
image

It's because of negative margin which is being added because of small size gutter being used to separate refresh button from selector.

So for a full width we need to offset negative margin of 4 on both sides by adding 8px into max width.

@cchaos
Copy link
Contributor

cchaos commented Aug 19, 2019

I did a quick test in Kibana, and there's just an issue when the update button isn't included.

You'll need to add the max-width: 100% to .euiSuperDatePicker__flexWrapper--noUpdateButton so it overrides a margin calculation that doesn't exist without the button. Same with .euiSuperDatePicker__flexWrapper--isAutoRefreshOnly.

@shahzad31
Copy link
Contributor Author

I did a quick test in Kibana, and there's just an issue when the update button isn't included.

You'll need to add the max-width: 100% to .euiSuperDatePicker__flexWrapper--noUpdateButton so it overrides a margin calculation that doesn't exist without the button. Same with .euiSuperDatePicker__flexWrapper--isAutoRefreshOnly.

@cchaos can you please tell me exactly where in kibana you faced above issue?

@shahzad31 shahzad31 force-pushed the fix/issue-2225-superdatepicker-leaves-unncessary-marging-bcoz-of-nagtaive-marging-usage branch from 089f6d0 to 0b23f6d Compare August 28, 2019 23:38
…essary-marging-bcoz-of-nagtaive-marging-usage
@shahzad31
Copy link
Contributor Author

I did a quick test in Kibana, and there's just an issue when the update button isn't included.

You'll need to add the max-width: 100% to .euiSuperDatePicker__flexWrapper--noUpdateButton so it overrides a margin calculation that doesn't exist without the button. Same with .euiSuperDatePicker__flexWrapper--isAutoRefreshOnly.

@cchaos Thanks for finding that issue, i have updated the PR. I have tested in kibana, seems okay to me now.

@cchaos cchaos self-requested a review August 29, 2019 13:29
Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Thanks @shahzad31 . Just had a small comment on the language used in you CL entry. Also you'll need to rebase with master to get updates to the CL. Once that's done, you're good to merge.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com>
@shahzad31 shahzad31 merged commit 20ff820 into elastic:master Aug 29, 2019
@shahzad31 shahzad31 deleted the fix/issue-2225-superdatepicker-leaves-unncessary-marging-bcoz-of-nagtaive-marging-usage branch August 29, 2019 15:45
@cchaos
Copy link
Contributor

cchaos commented Aug 29, 2019

@shahzad31 I'll get this fixed for you, but the reason I had asked to rebase with master is because your CL entry is in the wrong location. It needed to be under the Master heading instead of associated with the wrong release.

Screen Shot 2019-08-29 at 11 45 54 AM

No worries, though I'll fix it directly.

cchaos added a commit that referenced this pull request Aug 29, 2019
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
…picker (elastic#2236)

* offset negative margin for max width inside container

* update change log

* use constant for px value

* handled no update button and refresh only button scenerios

* Update CHANGELOG.md

Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com>
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
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.

EuiSuperDatePicker leaves unnecessary margin on right side when used in FlexGroup
3 participants