Page MenuHomePhabricator

Vertical page previews missing last line
Closed, ResolvedPublic2 Estimated Story Points

Description

Vertical page previews are one line shorter than their horizontal counterparts:

Screen Shot 2017-05-21 at 1.46.14 PM.png (439×348 px, 142 KB)

Screen Shot 2017-05-21 at 1.46.04 PM.png (316×493 px, 156 KB)

Acceptance criteria:

  • Add one more line of text to vertical previews (Nelson Piquet) so that the gap between the last line and the cog is reduced.

Steps to reproduce:

Go to https://en.wikipedia.org/wiki/Zenobia as a logged-in user with page preview on
Hover over "Syria"
The last line of text is not available - there is one line of white space between the end of the extract and the settings cog

Developer notes

Inspecting the api request there is more text available so we should be able to increase the height of the preview text with css.

Event Timeline

ovasileva moved this task from Incoming to Upcoming on the Web-Team-Backlog board.

Further clarification:

  • Vertical previews are previews with horizontal layout
  • What is missing:
    Screen Shot 2017-05-23 at 6.35.33 PM.png (418×614 px, 165 KB)
ovasileva set the point value for this task to 2.May 23 2017, 4:40 PM
bmansurov subscribed.

This is closely related to T165974, so I'm going to work on both task together.

Change 356465 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/Popups@master] Make vertical preview show 7 lines

https://gerrit.wikimedia.org/r/356465

Jdlrobson subscribed.

I'm finding myself unsure if I've understood this task correctly. Reviewing Baha's patch I see an additional line:

Before:

Screen Shot 2017-06-01 at 1.21.07 PM.png (382×494 px, 149 KB)

After:
Screen Shot 2017-06-01 at 1.19.15 PM.png (399×526 px, 157 KB)

However, there is still more text that is possible to show.. I thought the goal was to take up as much vertical whitespace as possible?
e.g.

Screen Shot 2017-06-01 at 1.24.30 PM.png (371×526 px, 164 KB)

Can someone clarify? @ovasileva

@Jdlrobson - not quite, the goal is as in the task descrption - adding one more line to vertical previews. We want vertical and horizontal previews to have the same of amount of space between the end of the text and the setting cog.

Change 356465 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Make vertical preview show 7 lines

https://gerrit.wikimedia.org/r/356465

phuedx added subscribers: ABorbaWMF, phuedx.

Over to you @ABorbaWMF. Find a couple of articles with long previews on the Beta Cluster and marvel at the additional line of text that you can see!

Tested on the Dog article on Beta. I purged the page. I am still seeing page previews with 7 lines instead of 8 line. @phuedx, do you think I need a taller image? I tested against the Canidae and Color Blindness articles.

image.png (768×1 px, 486 KB)
image.png (768×1 px, 304 KB)

@ABorbaWMF, do you have any kind of zoom on in your browser, @bmansurov mentioned that it might not display correctly due to zoom levels

Also, the code is created to have 7 lines. Did we want 8? If we look at the screenshot from the description, there are 6 lines. So we increased it to 7.

@bmansurov - I'm a bit confused, I think there was some confusion in the task description. In the description, the vertical extract has 8 lines and we wanted to increase it by one line to 9. In @ABorbaWMF's screenshot, we have 7.

@ovasileva, OK, let's clarify it. So the "WannaCry" screenshot (the first one in the description) has 6 lines, correct? Which screenshot has 8 lines again?

@bmansurov: in the description, the Nelson Piquet screenshot has 8 lines, we want it to have 9 lines. By "one line shorter" I meant that the distance between the end of the text and the settings cog in the vertical previews (Nelson Piquet) is two lines, while in the horizontal previews (WannaCry) it is one line

@ovasileva thanks for clarifying. I'll update the A/C to include what you meant.

Change 358970 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/Popups@master] Increase line number count of preview with tall image

https://gerrit.wikimedia.org/r/358970

Change 358970 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Increase line number count of preview with tall image

https://gerrit.wikimedia.org/r/358970

Tested on the [[ Tested on the Dog article on Beta. I purged the page. | Dog ]] article on Beta. I purged the page. Tried a number of different browsers and systems. Lots of lines now :)