Page MenuHomePhabricator

Result without body breaks the SearchVue extension
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • go to beta and search for "portrait"
  • Click on any of the result
  • Scroll down and find entry WITHOUT text

What happens?:

  • Nothing happen

What should have happened instead?:

  • All entries should have the arrow if hovered (currently all items after the one without text do not have the arrow)
  • The search Vue should open on click

Other information (browser name/version, screenshots, etc.):
The error is due to the resulting body not having the ".searchResult" entry, therefore, breaking with this error:

[Error] TypeError: null is not an object (evaluating 'searchResultLi.querySelector('.searchresult').parentElement')

Event Timeline

SimoneThisDot added subscribers: Sneha, CBogen.

I have implemented a quick fix to prevent the search preview to work with these results. This will not show the arrow next to the results and will also ensure the search preview does not open when these results are clicked.

I tried to implement a solution that would show the search preview, as it is technically feasible, but as this just happens if the article is empty, I really do not what the user would gain from seeing an empty popup.

Happy to discuss this further but i thought to create the patch just in case to slimline this fix if you guys thing it can be reproduced on production (not sure if empty pages are allowed)

cc: @CBogen @Sneha

[Please add codebase project tags - thanks!]

@SimoneThisDot can you share an example of an empty article that triggers this issue?

Change 883586 had a related patch set uploaded (by Simone Cuomo; author: Simone Cuomo):

[mediawiki/extensions/SearchVue@master] Result without body breaks the SearchVue extension

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

Change 883586 merged by jenkins-bot:

[mediawiki/extensions/SearchVue@master] Result without body breaks the SearchVue extension

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

I can't reproduce this with the steps above.

Etonkovidova added a subscriber: Etonkovidova.

@SimoneThisDot can you share an example of an empty article that triggers this issue?

Here is an animated gif (using @SimoneThisDot example):enwiki betalabs search term:portrait, scroll to National Portrait Gallery, London article:

no_arrow.gif (745×1 px, 477 KB)

It's a an edge case (but not unrealistic one), probably needs some discussion. I'm moving it to Design QA for now.

@Sneha you cannot reproduce it because the fix has already been merged into Beta.

I can't reproduce this with the steps above.

Copying the discussion from Slack:

Carly Bogen:
maybe Matthias knows if this is something that is possible to reproduce in production and therefore worth fixing?

Matthias Mullie:
If it can happen on beta, it is certainly possible for it to happen in prod too, although it’s not likely that there would be empty main-namespace pages, and even less likely for them to show up in search results - IMO the least-effort fix that Simone proposed is probably adequate

I looked at ruwiki wmf.19 - Служебная:Короткие_страницы (it's the ruwiki page analogous for enwiki Special:ShortPages.

The following search: ruwiki search item: ‎Гражданство США returns an article that is not of zero length (57 bytes), but has 0 words. And the issue with non-appearing arrow is present for that article.

Screen Shot 2023-01-26 at 10.18.58 AM.png (1×1 px, 315 KB)

Also checked

  • redirects
  • deleted articles
  • red links like for Wanted/MostWanted pages

Looking at the video that @Etonkovidova shared. And it seems like a reasonable solution to not have arrows/previews for articles with no words since there is no point opening an empty box.

Looking at the video that @Etonkovidova shared. And it seems like a reasonable solution to not have arrows/previews for articles with no words since there is no point opening an empty box.

Thanks, it does makes sense although from users' point of view, the behavior might look rather complicated. We have three cases for the search preview on mobile:

  • the arrow is displayed and the search preview is present
  • the arrow is displayed, but "No content to preview" message will be displayed

Screen Shot 2023-01-27 at 11.20.10 AM.png (992×740 px, 166 KB)

  • the arrow is not present.

When scrolling the search results, it might be difficult to figure out the difference between those three cases. I transferred the comment https://phabricator.wikimedia.org/T327873#8562264 into QA task T328165: [QA] QuickView - additional search test cases to check on Desktop/Mobile plus added some additional cases to check.

I think the case mentioned here is specifically for results with no snippet at all. In those cases I think it is okay to not have arrows or preview. But there are cases where the search result looks like any other search results and the users may expect a preview - in those cases we say "No content to preview".

So there are three cases:

  1. Preview exists (best case)
  2. Preview does not exist message (we do not currently have this on desktop and I wonder what happens in this case?)
  3. Snippet does not exist/empty result so then there is no expectations to open preview hence no arrow.