Page MenuHomePhabricator

Use TypeaheadSearch pending state in Vector search
Closed, ResolvedPublic2 Estimated Story Points

Description

As part of T336526 we'd like to update the Vector markup to use Codex. This should unblock using the pending state. TypeaheadSearch has a pending state feature, which displays a message and a progress bar below the search input when the results take longer than half a second to load (see documentation). The Vector search displays a similar message while Codex is loading, but doesn't use this pending state feature, meaning there is no feedback for the user if they're waiting for search results to load on a slow connection.

Since Codex already provides this feature, Vector should use it.

QA

  1. Test in patch demo or beta cluster
  2. throttle internet as slow as possible
  3. enter text into search, and watch carefully for loading search message to show. it often takes a few tries and it shows up only for a very short time

QA Results - Beta

ACStatusDetails
1T321106#8962074

Event Timeline

Change 844001 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/skins/Vector@master] [WIP] search: Use pending state feature in TypeaheadSearch

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

Here's what the behavior looks like with this patch:

I made it WIP because there's a bit of a jarring transition. The Web team can decide whether to try to fix that transition in Codex, or to accept it for now.

(Ignore the bug where the wrong results are shown, that's T321108)

Jdlrobson subscribed.

Roan, presumably this relates to the CSS components work?

I made it WIP because there's a bit of a jarring transition. The Web team can decide whether to try to fix that transition in Codex, or to accept it for now.

(Ignore the bug where the wrong results are shown, that's T321108)

I think that's already an improvement, only comment, the loading results message is differently padded. Once to the left, once underneath the input value (second is correct).

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

[mediawiki/skins/Vector@master] Use Codex for typeahead search styles

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

Estimation instructions: Feel free to estimate this if you think it is not in the scope of T336526.

If not, please retitle it [subtask] Use TypeaheadSearch pending state in Vector search

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

[mediawiki/skins/Vector@master] Use Codex for typeahead search styles

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

LGoto set the point value for this task to 2.Jun 1 2023, 5:41 PM

@Jdlrobson A question that came up during estimation is whether or not the Codex loading state can replace the Vector loading state shown for loading in Vue.js. While they are shown in difference scenarios, Codex's loader is for search results, Vector's is for loading in Vue.js when the search element is focused on page load, they have practically the same design. The Vector loader has been a huge pain to maintain and reproduce historically, and removing it would put this task in line with the efforts in T322077.

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

[mediawiki/skins/Vector@master] Use Codex for typeahead search styles

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

@Jdlrobson A question that came up during estimation is whether or not the Codex loading state can replace the Vector loading state shown for loading in Vue.js.

Yes it can and should.

Moving to sprint 5, since we descoped the ZHWIKI deployment and this is happening as a subtask of T322077.

Jdlrobson renamed this task from Use TypeaheadSearch pending state in Vector search to [subtask] Use TypeaheadSearch pending state in Vector search.Jun 13 2023, 12:04 AM
Jdlrobson renamed this task from [subtask] Use TypeaheadSearch pending state in Vector search to Use TypeaheadSearch pending state in Vector search.Jun 13 2023, 4:47 PM
Jdlrobson assigned this task to bwang.
Jdlrobson raised the priority of this task from Medium to High.

Moved back to sprint 6, as this is only partially fixed. Bernard will update ticket to outline what work is remaining here.

Jdlrobson lowered the priority of this task from High to Medium.Jun 20 2023, 4:36 PM

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

[mediawiki/skins/Vector@master] Replace search loader indicator with Codex pending search message

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

bwang removed bwang as the assignee of this task.Jun 20 2023, 6:39 PM
bwang updated the task description. (Show Details)

Change 931674 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Replace search loader indicator with Codex pending search message

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

Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

QA Steps

Test in patch demo or beta cluster
throttle internet as slow as possible
✅ AC1: enter text into search, and watch carefully for loading search message to show. it often takes a few tries and it shows up only for a very short time

Screen Recording 2023-06-24 at 6.03.17 PM.mov.gif (958×1 px, 221 KB)

LGTM. I've opened T340559 as potential follow up work.

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

https://patchdemo.wmflabs.org/wikis/9231004af9/w/

Change #844001 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] [WIP] search: Use pending state feature in TypeaheadSearch

Reason:

Hello this is an automated message.
I am abandoning this patch as it over a year old, and is not currently in a mergeable state. This has nothing to do with the quality of the patch.

If you still care about this patch, please feel free to restore it and rebase it, and we can happily continue the conversation to help you get it merged.

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