Page MenuHomePhabricator

Edit history search
Closed, ResolvedPublic

Assigned To
Authored By
scblr
Jan 14 2022, 5:28 PM
Referenced Files
F35023992: spinner.gif
Mar 25 2022, 6:40 PM
F34924703: Edit history.png
Jan 20 2022, 5:02 PM
F34924693: Edit history.png
Jan 20 2022, 5:00 PM
F34924697: Edit history-2.png
Jan 20 2022, 5:00 PM
F34924695: Edit history-1.png
Jan 20 2022, 5:00 PM
F34918397: image.png
Jan 14 2022, 5:28 PM
F34918379: Edit history2.png
Jan 14 2022, 5:28 PM
F34918386: image.png
Jan 14 2022, 5:28 PM

Description

Background

In order to make it easy for users to find a specific revision in an article, we want to offer functionality to easily search an article’s edit history. Screenshots from related functionality on Desktop (Link):

image.png (762×1 px, 284 KB)
image.png (1×1 px, 131 KB)
image.png (1×1 px, 371 KB)

Links to external tools:

The task
  • Implement search of an article’s revision history, the things that should be searchable should include by date, tags, article, username, additions, data, open text, (drawing inspiration as well from our notifications search)
  • iOS does have a native revision history but not a search/filter functionality. Sync with iOS engineers to see if leaving out search was because of technical limitations.
  • Note the filter/sort aspect will be linked in the search bar (T299233)
User stories

When reading Wikipedia, I want to search the revision history, so I can efficiently navigate to edits that I’m looking for.

When reading Wikipedia and noticing a detail about an article, I want to search for text to know who and when the edit was made, in order to understand the edit’s background.

Design (Figma)
010203
Edit history.png (1×720 px, 98 KB)
Edit history-1.png (1×720 px, 83 KB)
Edit history.png (1×720 px, 29 KB)

01) Tapping the search bar takes users to the search interface (next screen)

02) Search view

  • The search allows users to search information in front of them, namely a full text search for dates, edit summaries/previews, time, amount of bytes and username.
  • Results are highlighted in yellow

03) Empty state of the search (reused from Notifications search)


APK: https://github.com/wikimedia/apps-android-wikipedia/pull/3181/checks

Event Timeline

scblr renamed this task from [SPIKE] Edit history search to Edit history search.Jan 14 2022, 5:34 PM
JTannerWMF renamed this task from Edit history search to Edit history search.Jan 14 2022, 5:35 PM
JTannerWMF updated the task description. (Show Details)
LGoto triaged this task as Medium priority.Jan 19 2022, 5:14 PM
LGoto moved this task from Needs Triage to Up Next on the Wikipedia-Android-App-Backlog board.
scblr updated the task description. (Show Details)

Hi @scblr

The search function has been implemented, please check the latest APK in the ticket description. (the APK is the same as T299233, so you can test them together).

Looks good to me @cooltey – it feels like sometimes the performance of the search is a bit slow. But I think you flagged that in the beginning.

Re: loading indicator – the constant flashing (disappearing/reappearing) of the loading indicator feels suboptimal and is perceived like an error/endless loop (when there are a couple of results). Is there a way to keep the spinner visible at all times? Here’s an example animation:

spinner.gif (600×800 px, 88 KB)

Thanks!

Hi @scblr

Re: loading indicator – the constant flashing (disappearing/reappearing) of the loading indicator feels suboptimal and is perceived like an error/endless loop (when there are a couple of results). Is there a way to keep the spinner visible at all times? Here’s an example animation:

Please download the latest APK to see the improved filter/search.

After making a couple of implementations, I found out this cannot be achieved easily due to the restriction of the Paging library.

The loading behavior contains Loading and NotLoading, and each 500 item will trigger the Loading and NotLoading status again and again, and that's why you see the progress bar animation keeps flashing.

Now we have a better caching mechanism, which means users will not see the flashing progress bar that often unless they manually refresh (clear the cache) the list.

Or, maybe we can add a static text, such as "Search..." or "Still loading...".

Thanks @cooltey – this looks good to me. What I’m concerned about though is the performance of the search. A delay/lag is most noticeable when typing, hitting the x to delete the search term, hitting the button or attempting to scroll. See the attached video on a Pixel 3:

https://www.dropbox.com/s/03812fgpji89ovb/screen-20220330-103330.mp4?dl=0

Is there a way to improve this? E.g. by not loading search results after every character but after users stop typing (e.g. load 0.5s after users stop typing). I’m open to any other suggestions from your end.

Thanks!

cooltey added a subscriber: Dbrant.

Hi @scblr

Thanks @cooltey – this looks good to me. What I’m concerned about though is the performance of the search. A delay/lag is most noticeable when typing, hitting the x to delete the search term, hitting the ← button or attempting to scroll. See the attached video on a Pixel 3:

@Dbrant has found the ultimate solution for searching and filtering, and the performance has been increased incredibly!

Please check the latest APK to see how it has been improved. 😄

@cooltey the performance is incredible now, thanks for collaborating with dmitry! 👏

I noticed that the loading behavior is now different again, could that be? It currently loads like this:

  1. Header
  2. Content
  3. Search bar

Can we change it to this?

  1. Header
  2. Search bar
  3. Content

Search and content can also fade in at the same time if that is easier to implement.

I noticed that the loading behavior is now different again, could that be? It currently loads like this:

@scblr Done. Forgot to move this to design signoff last week 😓

Per our discussion in Slack, I have updated the way of displaying the stats, search bar, and the list. Please check the latest APK to see the changes.

ABorbaWMF subscribed.

Testing on 2.7.50400

I moved this to did not pass QA because I was unable to search based on the criteria listed here:

The search allows users to search information in front of them, namely a full text search for dates, edit summaries/previews, time, amount of bytes and username.

I could not figure out how to successfully search for dates, times, or amount of bytes.

Hi @ABorbaWMF

This is expected since I removed the logic of searching dates, times, and bytes from the list because it looks a little bit confused when these texts are highlighted in the search results.

@scblr Please let me know if you need to add the logic back, or if you think it is fine then please help to move to the QA signoff column. Thanks!

thanks @ABorbaWMF for spotting this

@cooltey

(...) because it looks a little bit confused when these texts are highlighted in the search results.

What do you mean by “confused”? Would it be possible to provide screenshots? I think searching by date and time could be of interest, bytes likely not that much (but if we do the others – we can include bytes too).

Let me know if you need designs that illustrate the highlights.

Thanks!

Hi @scblr

Please confirm the final decision from our last conversation that we will have another ticket for an advanced date/time filter for the search function?

Hi @scblr

Please confirm the final decision from our last conversation that we will have another ticket for an advanced date/time filter for the search function?

Confirmed! ✅

Searching for terms appears to be working on 2.7.50402-r-2022-05-03