Page MenuHomePhabricator

Initial implementation of Quickview Feature
Closed, ResolvedPublic

Description

Create an initial version of the QuickView feature which can be "tested in production" on Commons.

Note for QA and design review of this feature: make sure to include the URL params quickview=true to enable this feature. Once the patch lands on Commons, you can use this link to get both QuickView and Vue.js debug:
https://commons.wikimedia.org/wiki/Special:MediaSearch?debug=true&quickview=true

Details

Event Timeline

Change 610940 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Add QuickView to search results

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

@egardner After testing this out via ngrok, there are a handful of small changes we could make to improve the quick view. Happy to move any of these to another ticket as I don't want to delay this going out.

  • Changing the background color behind the images to be a bit darker, base20 or #54595d
  • Can we make the quick view independently scrollable? On smaller viewports or with longer descriptions you can't access the "More Details" button without scrolling to the bottom of the page. Screenshot of this below.

Screen Shot 2020-07-23 at 10.09.38 AM.png (1×2 px, 2 MB)

  • Is there anyway to scrape out the styling that is showing the gray box and border below the description? Screenshot below.

Screen Shot 2020-07-23 at 10.33.43 AM.png (524×1 px, 145 KB)

  • Can we truncate the description text to 250 ish characters?
  • Can we swap out the blue button "more details" with the gray with blue text on gray primary button and increase the margin top of the button by 6ish px?

Screen Shot 2020-07-23 at 10.36.01 AM.png (428×748 px, 29 KB)

  • Can we reduce the margin above the file name / title to 12px ish instead of the 30px ish it is now?

Screen Shot 2020-07-23 at 10.37.43 AM.png (760×1 px, 133 KB)

There are a few design challenges I haven't solved completely yet, including the awkward audio quickview, different css in descriptions, etc. that I'll be working on.

I think the question of scrolling behavior and description truncation should be left to the next patch for this feature, because there is a lot to think about here (for example, truncation likely also means throwing away markup, which is sometimes extensive in these fields). I'm going to remove all scroll-related CSS from the quickview except for the position:sticky rule for now. Let's play with the initial version of this feature on Commons and then we can try to determine the best way to solve the problem of extensive content within previews.

Will address the other issues here today.

@egardner @mwilliams should we create new subtasks for solving the scroll and truncation/markup issues?

@CBogen I think the problem of "how to deal with long, arbitrary, inconsistent text and markup from file pages in QuickView" would benefit from its own ticket – we would do well to think carefully about what information we really want to display here and how we want to display it given what we're working with.

I think I figured out a way to get scrolling behavior a little closer to what @mwilliams probably has in mind so I'll try to include that here; may not need a ticket for that yet.

Change 610940 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add QuickView to search results

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

Etonkovidova subscribed.

The screenshots below are from commons betalabs for @mwilliams review (as per the comment).

(1) Please confirm that the color is ok.

Changing the background color behind the images to be a bit darker, base20 or #54595d

The color is now

.wbmi-media-search-quick-view__thumbnail
    background-color: #72777d;

to compare

#72777d#54595d
Screen Shot 2020-08-04 at 5.48.28 PM.png (622×381 px, 200 KB)
Screen Shot 2020-08-04 at 5.46.53 PM.png (629×400 px, 198 KB)

(2) Seems to be Done:

Can we make the quick view independently scrollable? On smaller viewports or with longer descriptions you can't access the "More Details" button without scrolling to the bottom of the page. [...]

Screen Shot 2020-08-04 at 5.51.11 PM.png (632×656 px, 123 KB)
Screen Shot 2020-08-04 at 5.51.21 PM.png (569×666 px, 76 KB)

(3) Done.

Is there anyway to scrape out the styling that is showing the gray box and border below the description [...].

Screen Shot 2020-08-04 at 5.48.28 PM.png (622×381 px, 200 KB)

(4) Not Done

Can we truncate the description text to 250 ish characters?

Below the screenshot of the file image description that has 526 words

Screen Shot 2020-08-04 at 5.48.28 PM.png (622×381 px, 200 KB)

(5) The top margin still needs to be changed?

Can we swap out the blue button "more details" with the gray with blue text on gray primary button and increase the margin top of the button by 6ish px?

.wbmi-media-search-quick-view__cta {
    margin: 0.5rem 0;
    margin-top: 0.5rem;
    margin-right: 0px;
    margin-bottom: 0.5rem;
    margin-left: 0px;
}

(6) padding is 16px. There should be more adjustments?

Can we reduce the margin above the file name / title to 12px ish instead of the 30px ish it is now?

Screen Shot 2020-08-04 at 6.14.07 PM.png (697×657 px, 134 KB)

Really great design QA work @Etonkovidova!

It's been tricky to test these for me, so once it's out behind the URL parameter I'll make a new ticket with any remaining adjustments to the ui.

  1. Background color This is ok. Eric reached out to me about adjusting that slightly to not be as dark, so #72777d is what we landed on.
  2. Independent scrolling Agreed, seems done! Will spend more time with this later to make sure.
  3. Scraping out gray styling Seems done! This wasn't showing up for every file, will help test this out more comprehensively later.
  4. Truncating Not done but I will hopefully have a more holistic opinion on this once I'm able to test a large amount of cases in production. We might need to do more in addition to truncating.
  5. Margins Will check on this afterwards, fine for now.
  6. Padding Will check on this afterwards, fine for now.

In general this feels ready to go with the caveat that there will probably be more design changes to come in a separate ticket.

Thanks, @mwilliams - agree, the issues are quite minor. Checked in production- commons wmf.3 - seems to be fine.