Page MenuHomePhabricator

Generate Minerva search HTML from SkinMustache data
Closed, ResolvedPublic3 Estimated Story Points

Description

The search box that is outputted in Minerva uses data defined in MinervaTemplate::getTemplateData() that duplicates data generated by SkinMustache

TODO

  • Remove searchPageTitle from MinervaTemplate::getTemplateData(). Update template to use ['data-search-box']['page-title'] instead.
  • Remove searchButton from MinervaTemplate::getTemplateData(). Update template to use ['data-search-box']['html-minerva-searchClass'] and msg-searchbutton instead.
  • Remove wgScript from MinervaTemplate::getTemplateData(). Update template to use [data-search-box]form-action instead
  • Remove the search template parameter (see note below)
  • Remove placeholder from MinervaTemplate::getTemplateData()

Note about 'search' parameter

When visiting https://en.m.wikipedia.org/wiki/Foobar?search=foo the "Foo" string is shown in the input title. This is not consistent with desktop where none is shown and not helpful as focusing the search clears the string. This should thus be removed.

QA steps

  • Visit any page on beta cluster
  • Verify the logo (and/or site title) is present in the page.
  • Type some characters into search, and hit enter. Confirm you are taken to the top search result.
  • Type some characters into search, and click "search within pages". You should be taken to a list of search results

QA Results - Beta

ACStatusDetails
1T290525#7468155
2T290525#7468155
3T290525#7468155

QA Results - Beta

ACStatusDetails
1T290525#7475231
2T290525#7475231
3T290525#7475231

Event Timeline

Jdlrobson created this task.

I don't think this needs any additional analysis (I can provide more details if needed for estimation).

Jdlrobson added a subscriber: cjming.
bwang removed bwang as the assignee of this task.Oct 13 2021, 7:21 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.
bwang subscribed.

Change 730625 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/MinervaNeue@master] Generate Minerva search HTML with SkinMustache data

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

Change 730625 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Generate Minerva search HTML with SkinMustache data

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

Change 731775 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/MinervaNeue@master] Generate Minerva search HTML with SkinMustache data

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

Change 731775 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Generate Minerva search HTML with SkinMustache data

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

Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

QA Steps

Visit any page on beta cluster
❌ Verify the logo (and/or site title) is present in the page.
The logo isn't showing, but I do see the Desktop and Mobile (Beta Cluster) indicators.

Screen Shot 2021-10-18 at 9.54.00 AM.png (868×1 px, 174 KB)

Screen Shot 2021-10-18 at 9.54.08 AM.png (868×1 px, 230 KB)

❌ AC2: Type some characters into search, and hit enter. Confirm you are taken to the top search result.

Screen Recording 2021-10-18 at 9.49.24 AM.mov.gif (754×918 px, 753 KB)

✅ AC3: Type some characters into search, and click "search within pages". You should be taken to a list of search results

Screen Recording 2021-10-18 at 9.56.01 AM.mov.gif (754×918 px, 336 KB)

Edtadros updated the task description. (Show Details)

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

[mediawiki/skins/MinervaNeue@master] Restore title to mobile skin without logo

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

Jdlrobson raised the priority of this task from High to Unbreak Now!.Oct 20 2021, 8:42 PM

❌ AC2: Type some characters into search, and hit enter. Confirm you are taken to the top search result.

That looks like a pass to me? Albert Einstein is the top result.

❌ Verify the logo (and/or site title) is present in the page.

This is a train blocker. It's live on https://meta.m.wikimedia.org/wiki/Special:Version now.

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

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

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

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

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

[mediawiki/skins/MinervaNeue@wmf/1.38.0-wmf.5] Restore title to mobile skin without logo

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

Change 732336 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@wmf/1.38.0-wmf.5] Restore title to mobile skin without logo

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

Mentioned in SAL (#wikimedia-operations) [2021-10-20T23:44:35Z] <thcipriani@deploy1002> Started scap: Backport: [[gerrit:732336|Restore title to mobile skin without logo (T290525)]]

Mentioned in SAL (#wikimedia-operations) [2021-10-20T23:56:16Z] <thcipriani@deploy1002> Finished scap: Backport: [[gerrit:732336|Restore title to mobile skin without logo (T290525)]] (duration: 11m 41s)

Jdlrobson lowered the priority of this task from Unbreak Now! to High.Oct 20 2021, 11:59 PM

Change 732436 merged by Jdlrobson:

[mediawiki/skins/MinervaNeue@master] Restore title to mobile skin without logo

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

Visit any page on beta cluster
✅ AC1: Verify the logo (and/or site title) is present in the page.
The logo isn't showing, but I do see the Desktop and Mobile (Beta Cluster) indicators.

Screen Shot 2021-10-29 at 6.14.06 AM.png (1×882 px, 290 KB)

Screen Shot 2021-10-29 at 6.14.25 AM.png (1×926 px, 344 KB)

❓ AC2: Type some characters into search, and hit enter. Confirm you are taken to the top search result.
@Jdlrobson, I think my confusion here is how this should behave if given a partial page title vs an entire page title. When I search for "Apple" and hit enter, it goes to the Apple page.

Screen Recording 2021-10-29 at 6.18.32 AM.mov.gif (910×814 px, 163 KB)

But when I type "hood", a partial title of "Hooded Seal", it takes me to the search page.
Screen Recording 2021-10-29 at 6.18.53 AM.mov.gif (910×814 px, 155 KB)

Logically it makes sense since it isn't a complete title match, but I jus want to be sure before I pass it.

✅ AC3: Type some characters into search, and click "search within pages". You should be taken to a list of search results

Screen Recording 2021-10-29 at 6.24.52 AM.mov.gif (910×814 px, 264 KB)

That's working as expected! Basically, pressing enter should relate to the text you've input. If the word is not complete,then we are not 100% sure which of the results is wanted.

Test Result - Beta

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

Test Artifact(s):

QA Steps

Visit any page on beta cluster
✅ AC1: Verify the logo (and/or site title) is present in the page.

Screen Shot 2021-10-29 at 6.14.06 AM.png (1×882 px, 290 KB)

Screen Shot 2021-10-29 at 6.14.25 AM.png (1×926 px, 344 KB)

✅ AC2: Type some characters into search, and hit enter. Confirm you are taken to the top search result.
When I search for "Apple" and hit enter, it goes to the Apple page.

Screen Recording 2021-10-29 at 6.18.32 AM.mov.gif (910×814 px, 163 KB)

But when I type "hood", a partial title of "Hooded Seal", it takes me to the search page.
Screen Recording 2021-10-29 at 6.18.53 AM.mov.gif (910×814 px, 155 KB)

Logically it makes sense since it isn't a complete title match, thanks @Jdlrobson for confirming this above in: T290525#7472607.

✅ AC3: Type some characters into search, and click "search within pages". You should be taken to a list of search results

Screen Recording 2021-10-29 at 6.24.52 AM.mov.gif (910×814 px, 264 KB)