Page MenuHomePhabricator

Review/fix preview popup alignment
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
eamedina
Jul 28 2023, 6:04 PM
Referenced Files
F37723859: 2023-09-14_12-26-21.png
Sep 14 2023, 7:48 PM
F37719082: WP_Wikipreview_2lines.webm
Sep 14 2023, 7:48 PM
F37723938: 2023-09-14_12-32-34.mp4.gif
Sep 14 2023, 7:48 PM
F37622471: image.png
Aug 23 2023, 3:04 PM
F37153767: image.png
Jul 28 2023, 6:04 PM
F37153764: image.png
Jul 28 2023, 6:04 PM

Description

Popup alignment seems to be inconsistent/a bit off in editing mode in Wordpress. When a target word is positioned more towards the right/left edge of the screen, the preview anchor should update for better rendering.

Initial behavior:

image.png (1×1 px, 354 KB)

Expected behavior:

image.png (994×1 px, 200 KB)

QA Results - WordPress-Dev

ACStatusDetails
1https://phabricator.wikimedia.org/T343027but please see possible issues section below

Event Timeline

PWaigi-WMF triaged this task as Medium priority.Aug 1 2023, 3:42 PM

PR: https://github.com/wikimedia/wikipediapreview-wordpress/pull/91

Currently rule setting when the highlighted item is at

  • left 20% of the screen, change the popover placement to right;
  • right 20% of the screen, placement to left.

@hueitan @eamedina The popup alignment seems to be fine but as seen in the gif below. I was wondering when you click on each of the Wikipreview words, you'll see the "Read more on Wikipedia" outline highlighted and at times not. If you play around just rotating the words, sometimes the outline is highlighted even when it wasn't before, and vice versa. Also in the expected behavior screenshot in the description, it had no arrow pointer, compared to the first screenshot. Are you removing the arrow pointer? Also, please review the Possible Issue section even though it's not related to this task.

Status: ✅ PASS
Environment: WordPress- Dev
OS: macOS Ventura
Browser: Chrome 116
Device: MBA M2
Emulated Device:: N/A
Test Links:
http://dev-test.local/wp-admin/post.php?post=6&action=edit

✅AC1: https://phabricator.wikimedia.org/T343027

Gif

2023-09-14_12-32-34.mp4.gif (936×1 px, 638 KB)

Possible ISSUES:
When you do multiple words and go over two lines while creating a Wikipreview for it, the Wikipreview line disappears as seen on the .webm. When you move it on the same line, the Wikipreview appears. Is this considered an issue?

Also when doing multiple words and going over two lines while creating a Wikipreview for it, Wikipedia previews seem to be confused and go to the next line in the middle of the next line, as seen in the screenshot.

2023-09-14_12-26-21.png (879×967 px, 158 KB)

Design to test the issues above as mentioned in the Inuka Tech chat. I will move this to Design sign-off. Thanks again for all your work! @hueitan

My response to it

click on each of the Wikipreview words, you'll see the "Read more on Wikipedia" outline highlighted and at times not

on my local, when preview popup opens, press Tab I will have the same result; but I don't see it a blocker and we can ignore it.

expected behavior screenshot in the description, it had no arrow pointer,

The arrow is on the left side of the popup, can you check again?

multiple words and going over two lines

Good catch, never think of this case. we use the wordpress Gutenberg native solution for the popup position, if you look at the hyperlink behaviour, it does the same thing; so I think we can ignore it too.