Page MenuHomePhabricator

Search: treatment at smaller resolutions
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
Jdlrobson
Jun 3 2021, 5:49 PM
Referenced Files
F34569855: Screen Recording 2021-07-29 at 3.22.01 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569861: Screen Recording 2021-07-29 at 3.25.51 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569864: Screen Shot 2021-07-29 at 3.29.59 PM.png
Jul 29 2021, 10:48 PM
F34569873: Screen Recording 2021-07-29 at 3.43.09 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569869: Screen Recording 2021-07-29 at 3.40.52 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569867: Screen Recording 2021-07-29 at 3.40.09 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569859: Screen Recording 2021-07-29 at 3.25.04 PM.mov.gif
Jul 29 2021, 10:48 PM
F34569875: Screen Recording 2021-07-29 at 3.44.29 PM.mov.gif
Jul 29 2021, 10:48 PM
Tokens
"Love" token, awarded by Jdlrobson.

Description

Description

After the proposed changes in T276566, the search icon at lower resolutions when clicked will take the user to the search page.

With some changes it should be possible to wire this up in such a way that it operates as it does at higher resolutions.

After talking to @alexhollender we will likely make this behave similar to mobile - e.g. open an overlay. This will likely require a slight change to our wire up and a new component.

Design

Basic demo: https://di-community-round-2.web.app

logged outlogged in
logged out.gif (587×496 px, 395 KB)
logged in.gif (588×497 px, 387 KB)

TODO

  • @alexhollender to provide mocks
  • Engineer to analyse and provide a suitable approach and fill in developer notes

Developer notes

See commit message of https://gerrit.wikimedia.org/r/699462 for the challenges on this one.

Acceptance criteria

  • Add a dedicated toggle button
  • Wire up toggle button to load and show/hide the search interface
  • When search is open the hamburger and logo is obscured underneath
  • When search is open the user links are visible (tricky bit)

QA steps

Browser compatibility could potentially be an issue with this ticket so please test the following steps with Chrome, Firefox, Safari, and Edge:

  1. Go to https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page
  2. Resize browser to <= 719px width
  3. Ensure that search magnifying glass icon appears in header
  4. Click search magnifying icon
  5. Ensure that hamburger menu icon and logo disappear. Ensure that search input appears and is focused.
  6. Type into input and ensure search suggestions appear
  7. Click the body of the page
  8. Ensure that hamburger menu icon, logo, and magnifying glass icon appears. Ensure that search input disappears.

QA Results - Beta

ACStatusDetails
1T284242#7247665
2T284242#7247665
3T284242#7247665

Event Timeline

Change 699462 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] POC: Search is hidden and expandable at lower resolutions

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

Change 699462 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] POC: Search is hidden and expandable at lower resolutions

Reason:

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

Jdlrobson updated the task description. (Show Details)

Change 699462 restored by Jdlrobson:

[mediawiki/skins/Vector@master] POC: Search is hidden and expandable at lower resolutions

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

Change 699462 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] POC: Search is hidden and expandable at lower resolutions

Reason:

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

Change 702486 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] WIP: Make search toggleable at smaller screen widths

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

Test wiki created on Patch Demo by NRay (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/bc39ecddd5/w/

@alexhollender can you please take a look at the above patchdemo and let me know if I've missed anything regarding the behavior or design? The icon spacing/sizes is another issue that I believe is being covered in another ticket.

Thanks!

nray subscribed.

@alexhollender can you please take a look at the above patchdemo and let me know if I've missed anything regarding the behavior or design? The icon spacing/sizes is another issue that I believe is being covered in another ticket.

this is looking great. one thing I was thinking about is: since there is less room for the search bar (especially for logged-in, where there are more user icons, and for languages where the word "Search" is longer) maybe the search results menu should stretch all the way to the far side of the Search button, so it can be that much wider. what do you think about that?

image.png (354×539 px, 104 KB)

also here's a screen recording of the current state:

notes from a discussion @nray and I just had:

  • we will use a click event to handle the closing of the expanded search field, rather than trying to use the focusout event
  • we will modify/remove the max-width on the input field so that it always takes up all available space when expanded
  • I will file a separate task regarding the tab behavior for the search menu

Test wiki created on Patch Demo by NRay (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/fec34acad1/w/

In T284242#7206819, @alexhollender wrote:

notes from a discussion @nray and I just had:

  • we will use a click event to handle the closing of the expanded search field, rather than trying to use the focusout event
  • we will modify/remove the max-width on the input field so that it always takes up all available space when expanded
  • I will file a separate task regarding the tab behavior for the search menu

@alexhollender Thank you. Please check out the patchdemo above with these revisions.

In T284242#7206507, @alexhollender wrote:

@alexhollender can you please take a look at the above patchdemo and let me know if I've missed anything regarding the behavior or design? The icon spacing/sizes is another issue that I believe is being covered in another ticket.

this is looking great. one thing I was thinking about is: since there is less room for the search bar (especially for logged-in, where there are more user icons, and for languages where the word "Search" is longer) maybe the search results menu should stretch all the way to the far side of the Search button, so it can be that much wider. what do you think about that?

That makes sense to me. I doubt it will be difficult, but I think that change should go in WVUI so it might be best to leave it to another ticket. I can take a look at it tomorrow

Change 702486 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Make search toggleable at smaller screen widths

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

@alexhollender just a heads up - this has now been merged so it's best to do the design review on beta (https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page) rather than the patchdemo

alexhollender_WMF added a subscriber: Jdrewniak.

@nray this is looking great.

we will need to address the spacing between the search (both collapsed & expanded state) and the user icons. should we address that here, or in T285786? cc @Jdrewniak

image.png (374×777 px, 65 KB)

Change 704594 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Widen WVUI search suggestions to edge of search button when search is toggled

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

Change 704595 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Make #p-search's start margin dependent on .vector-search-box-show-thumbnail

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

Change 704594 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Widen WVUI search suggestions to edge of search button when search is toggled

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

Change 704595 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Make #p-search's start margin dependent on .vector-search-box-show-thumbnail

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

we will need to address the spacing between the search (both collapsed & expanded state) and the user icons. should we address that here, or in T285786? cc @Jdrewniak

image.png (374×777 px, 65 KB)

@alexhollender I was wondering if either T285259, T191021, and/or T284584 would fix these spacing issues. It's easy for me to add a right margin or padding to the input box, but I'm not sure if that's needed when the other tickets are done.

Also, the stretching behavior for the search suggestions you suggested in T284242#7206507 has now been merged and you can check it out on beta!

@alexhollender I was wondering if either T285259, T191021, and/or T284584 would fix these spacing issues. It's easy for me to add a right margin or padding to the input box, but I'm not sure if that's needed when the other tickets are done.

sounds good

Also, the stretching behavior for the search suggestions you suggested in T284242#7206507 has now been merged and you can check it out on beta!

woo! looks awesome

nray claimed this task.
nray moved this task from Code Review to QA on the Web-Team-Backlog (Kanbanana-FY-2020-21) board.
nray added a subscriber: Edtadros.
nray updated the task description. (Show Details)

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Browser compatibility could potentially be an issue with this ticket so please test the following steps with Chrome, Firefox, Safari, and Edge:

Go to https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page
Resize browser to <= 719px width
✅ AC1: Ensure that search magnifying glass icon appears in header
Click search magnifying icon
✅ AC2: Ensure that hamburger menu icon and logo disappear. Ensure that search input appears and is focused.
Type into input and ensure search suggestions appear
Click the body of the page
✅ AC3: Ensure that hamburger menu icon, logo, and magnifying glass icon appears. Ensure that search input disappears.

BrowserLogged inLogged Out
Chrome
Screen Recording 2021-07-29 at 3.22.01 PM.mov.gif (868×718 px, 348 KB)
Screen Recording 2021-07-29 at 3.22.39 PM.mov.gif (868×718 px, 353 KB)
Firefox
Screen Recording 2021-07-29 at 3.25.51 PM.mov.gif (868×718 px, 417 KB)
Screen Recording 2021-07-29 at 3.25.04 PM.mov.gif (868×718 px, 392 KB)
Safari
Screen Recording 2021-07-29 at 3.40.09 PM.mov.gif (868×718 px, 376 KB)
Screen Recording 2021-07-29 at 3.40.52 PM.mov.gif (868×718 px, 361 KB)
Edge
Screen Recording 2021-07-29 at 3.44.29 PM.mov.gif (868×718 px, 341 KB)
Screen Recording 2021-07-29 at 3.43.09 PM.mov.gif (868×718 px, 386 KB)

@nray , the specific criteria of this task pass, however, the layout is off in Firefox. See below:

Screen Shot 2021-07-29 at 3.29.59 PM.png (139×710 px, 21 KB)

The heights of the Search button, Search Field, and what appears to be the outline of both are off.
Also, the orange talk page message notification overlaps the menu.

Edtadros added a subscriber: ovasileva.

@ovasileva , I believe this is a user links task so I'm moving it directly to Ready for Signoff.

Test wiki on Patch demo by NRay (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/fec34acad1/w/

Test wiki on Patch demo by NRay (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/bc39ecddd5/w/