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 EuiPopover arrow position in Android and Linux #3188

Merged
merged 4 commits into from
Mar 31, 2020

Conversation

dimitropoulos
Copy link
Contributor

@dimitropoulos dimitropoulos commented Mar 29, 2020

TLDR;

Before

Screenshot_20200329_105112

After

Screenshot_20200329_105107

This is a one-pixel offset change.

Summary

So I noticed that some of the chevrons (i.e. arrows) on the popovers on the BasicTables component had a dark line between the arrow and the box:

without dark line:

with dark line:

I noticed that this happens repeatably for the same components on the same page (at the same zoom level), as well as that which popovers on the page do it changes if I adjust my browser zoom. This suggests it's just a subpixel thingy, as I like to call them.

To help illustrate: we can move the arrow down to exaggerate the effect:
Screenshot_20200327_155107

Or we can move it up too far:
Screenshot_20200327_155059

It seemed like, in this case, all that was needed was one more pixel. And it's in better shape now.

I checked all of the positions in 3 different zoom levels and (on my machine, running chrome) they all seemed to work now. Just to be sure there wasn't anything I missed with the background of the popover and the background of the page both being white I made sure to color the background for the tests. I know the border is grey, but I can imagine why the bottom one might stand out more because of the bottom shadow, and also I found out that if you star at enough of these you start to imagine the line being there when it isn't thanks to the hermann grid illusion, haha.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@elizabetdev elizabetdev self-requested a review March 30, 2020 16:50
@elizabetdev
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3188/

@elizabetdev
Copy link
Contributor

Hi @dimitropoulos,

Thanks for creating this PR.

I tried to replicate this issue without success. I opened the page https://elastic.github.io/eui/#/tabular-content/tables and toggled the rows per page popovers. I tried in different browsers and I couldn't see the dark line.

Chrome with Zoom:

Screenshot 2020-03-30 at 19 11 43

Chrome without Zoom:

Screenshot 2020-03-30 at 19 12 07

Can you provide instructions on how to replicate the issue?

@snide
Copy link
Contributor

snide commented Mar 30, 2020

I've also never seen this issue. Giving us your browser and OS might help. This can also be something that comes from subpixel rendering, which non-retina screens can have issues with. A better summary of your test env will help us out.

@dimitropoulos
Copy link
Contributor Author

dimitropoulos commented Mar 30, 2020

sorry, I mentioned it was chrome, but I should have made it much clearer:

  • I'm using Linux 5.3 x86_84 on Chrome 80.0.3987.132

It doesn't happen for me (on Linux) on Firefox, although it is reproducible on Android (on Chrome - (well, Brave, but same thing)):

(note, that you have to go the third one down to see it)

@cchaos
Copy link
Contributor

cchaos commented Mar 30, 2020

👍 Yep, I can replicate this on Chrome on Android

@dimitropoulos
Copy link
Contributor Author

dimitropoulos commented Mar 30, 2020

bonus: if you go to the PR link on android, it's fixed! :)

CHANGELOG.md Outdated Show resolved Hide resolved
@elizabetdev elizabetdev changed the title moves popover bottom arrow closer to parent box Fix EuiPopover arrow position in Android and Linux Mar 31, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Thanks @dimitropoulos! I could replicate the issue in Android and the fix looks good to me!

@elizabetdev elizabetdev merged commit 31c332b into elastic:master Mar 31, 2020
@dimitropoulos dimitropoulos deleted the popover-chevron-placement branch April 2, 2020 23:20
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.

5 participants