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

Fix management footer logo spacing bug #30654

Merged
merged 7 commits into from
Feb 14, 2019

Conversation

flash1293
Copy link
Contributor

Summary

Fixes #22222

This PR fixes the problem of the above issue by setting a fixed value to the height of the preview image.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@flash1293 flash1293 requested review from timroes and lizozom February 11, 2019 15:40
@flash1293 flash1293 requested a review from a team as a code owner February 11, 2019 15:40
@flash1293 flash1293 added v7.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages v7.2.0 labels Feb 11, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine
Copy link
Contributor

💔 Build Failed

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.

The problem in IE is not the size of the image but the number of child flex boxes. It would be nice to fix this at the flex-box level instead of forcing sizing on the image.

To fix this at the flex level you just need to add min-height: 1px to the .mgtAdvancedSettings__field and to the EuiFormRow (will need a custom className as well).

You could also add the size prop to EuiImage so that it doesn't get to large. I tried it with size="m" and it looked pretty good.

@cchaos
Copy link
Contributor

cchaos commented Feb 11, 2019

Oh and since these are IE specific fixes, you could wrap them in the EUI SASS helper like:

@include internetExplorerOnly {
  min-height: 1px;
}

Or at least add a comment to the line that it's fixing IE.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@flash1293
Copy link
Contributor Author

@cchaos Ah, I tried that as lined out here philipwalton/flexbugs#75 but I missed the fact I had to apply it to all flex layers, not just the last one. Thanks a lot, will fix it tomorrow.

Regarding the image size - wouldn't it still look strange if the user provided an image with a large height and a small width? By setting both max-width and max-height it is made sure that the image is always displayed as a small preview thumb.

@cchaos
Copy link
Contributor

cchaos commented Feb 11, 2019

Great thanks!

wouldn't it still look strange if the user provided an image with a large height and a small width

That might be something we want to address on the EUI side, since, yes it could be odd that we're only maxing the width:

image

But for this particular case, since it's for the footer of a PDF, if they upload something that's very tall it will probably take up more space on the page than they're expecting so I like that it enhances showing the height vs width of the image.

@flash1293
Copy link
Contributor Author

Opened issue in EUI (elastic/eui#1554) and added min-height.

But for this particular case, since it's for the footer of a PDF, if they upload something that's very tall it will probably take up more space on the page than they're expecting so I like that it enhances showing the height vs width of the image.

For the moment it's the only image in settings but there might be others in the future so I'm not sure whether we should look too much on the ordinary aspect ratios of this image. Maybe 100px is too little to make something like this stand out, what about 400px?

Without height restriction:
screenshot 2019-02-12 at 10 31 18

With height restriction 400px:
screenshot 2019-02-12 at 10 31 06

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@flash1293
Copy link
Contributor Author

Jenkins, test this. Flaky test?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 added the bug Fixes for quality problems that affect the customer experience label Feb 13, 2019
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.

Great, ty!

@flash1293
Copy link
Contributor Author

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.1 v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too much white space after user adds custom reporting logo in IE
3 participants