Page MenuHomePhabricator

Places: Build search experience
Closed, ResolvedPublic

Assigned To
Authored By
Sharvaniharan
Nov 14 2023, 1:44 AM
Referenced Files
F41732656: places_dim.png
Jan 30 2024, 11:19 PM
F41732654: places.png
Jan 30 2024, 11:19 PM
F41699713: Screenshot_20240119-140511.png
Jan 19 2024, 1:08 PM
F41699715: Screenshot_20240119-140536.png
Jan 19 2024, 1:08 PM
F41699675: Screenshot_20240119-133932 copy.png
Jan 19 2024, 1:08 PM
F41697495: Screenshot_20240118-153957.png
Jan 18 2024, 2:45 PM
F41697489: Screenshot_20240118-153516.png
Jan 18 2024, 2:45 PM
F41697339: Screenshot_20240118-135036 copy.png
Jan 18 2024, 2:45 PM

Description

Design (Figma)
1. Empty state
image.png (1×720 px, 83 KB)
2. Results
image.png (1×720 px, 133 KB)
3. Multilingual
image.png (1×720 px, 144 KB)
4. No results
image.png (1×720 px, 83 KB)
  • Reuses design of the app’s global search for articles
  • Tapping a search item takes users to the preview on the map, adds the the item’s title to the top search bar, and enables the location (T351395)
  • Empty state features 'Recent search' terms, similar to the app’s global search. The search terms listed here are specific to the nearby feature.
  • Search items list the article’s title (search term highlighted in bold), title description (truncate to 1 line), the distance to the item and 'Saved' or 'Watched' indicators.
  • If multiple app languages are used, a tabbed view below search is shown
    • Switching the language, e.g. by tapping a German result in the above screen, affects the language button on the map as well (T351397).
    • 'More' leads to the app’s global 'Wikipedia languages' screen from Settings
  • Empty state displays 'No results' label with an illustration, vertically centered
  • To be discussed with @Sharvaniharan → how easy is it to show items from 'History' and 'Tabs' here as well?

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

Event Timeline

Sharvaniharan renamed this task from Places: Build search experience to Nearby: Build search experience.Nov 20 2023, 7:02 PM
Sharvaniharan renamed this task from Nearby: Build search experience to Places: Build search experience.Dec 7 2023, 2:29 AM

Hi @scblr
Should we change the hint text to Search places instead of Search nearby?

Hi @scblr

Have a few questions:

  1. I remember that we discussed that the cursor should be at the end of the text when user enters search mode from Places with some text. However, the existing behavior is to carry the text into search mode and highlighting it, so the user has an option to either click at the end of text and continue search or just hit backspace and start a new string. I liked the existing option better. Please let me know which way you feel is better:

https://youtube.com/shorts/xtq9q9RdXpQ?feature=share

These 3 are just so we can add as little Places mode specific changes to search screen as possible:

  1. This is the current Empty state during search and it looked sufficient, so I just wanted to make sure before adding more Places specific code in search mode, if the Empty state image in screen 4 is really needed:

empty.png (2×1 px, 125 KB)

  1. The tab count view doesn't exist in current search flow, do we need to add it for only Places mode? [This is separate from the tab count view being available while we are on the places screen. That will still be available.]
Count on places screen:
count.png (2×1 px, 828 KB)
No Count in Search mode:
no_count.png (2×1 px, 179 KB)
  1. What does the star icon in search result represent?

Thank you :-)

Hi @scblr

Have a few questions:

  1. I remember that we discussed that the cursor should be at the end of the text when user enters search mode from Places with some text. However, the existing behavior is to carry the text into search mode and highlighting it, so the user has an option to either click at the end of text and continue search or just hit backspace and start a new string. I liked the existing option better. Please let me know which way you feel is better:

https://youtube.com/shorts/xtq9q9RdXpQ?feature=share

Looks good to me!

These 3 are just so we can add as little Places mode specific changes to search screen as possible:

  1. This is the current Empty state during search and it looked sufficient, so I just wanted to make sure before adding more Places specific code in search mode, if the Empty state image in screen 4 is really needed:

empty.png (2×1 px, 125 KB)

I can’t access this image (Phabricator rights bug?). But it sounds fine in theory – can you update the screenshot?

  1. The tab count view doesn't exist in current search flow, do we need to add it for only Places mode? [This is separate from the tab count view being available while we are on the places screen. That will still be available.]
Count on places screen:
count.png (2×1 px, 828 KB)
No Count in Search mode:
no_count.png (2×1 px, 179 KB)

Also can’t see these images. But it also sounds fine in theory – can you update the screenshot?

  1. What does the star icon in search result represent?

Watched articles but can be ignored for now as it’s out of scope.

I have updated the permissions @scblr, images should be visible now. Sorry did not even know it was a thing 😅

@Dbrant @Sharvaniharan

The search view does not yet communicate with the map view, right? It took me to the map view after tapping a search result (e.g., Boston), but the map area did not adjust to the previously selected location.

I’ll review this once both views are working! 🚀

Hi @scblr
The location update after search was included in the branch. Here is what I see on the build:
https://www.youtube.com/shorts/FeELuWZ32ig
Are you finding it to be different please let me know.
Also, I tried enlarging the icon of the search result once we are back - in case there are many icons around. It can be seen more prominently on "Switzerland" search than "Boston" as seenin the video. Please let me know your thoughts on that.
APK is here: https://github.com/wikimedia/apps-android-wikipedia/pull/4319/checks

Thanks @Sharvaniharan – great progress! 👏

The location update after search was included in the branch. Here is what I see on the build:
https://www.youtube.com/shorts/FeELuWZ32ig
Are you finding it to be different please let me know.

1)

In the YouTube video you provided, the "Boston" and "Switzerland" articles should be opened like in this view:

2) The search doesn’t work for certain locations. Try e.g. searching for "Tokyo" and "Biarritz", which leaves the map unchanged currently. Here’s a video that shows the issue:

https://www.dropbox.com/scl/fi/dbp126a2zyrko9bxsodp8/screen-20240108-125831.mp4?rlkey=rs655um48uwlqvtqpt994b3td&dl=0

Also, I tried enlarging the icon of the search result once we are back - in case there are many icons around. It can be seen more prominently on "Switzerland" search than "Boston" as seenin the > video. Please let me know your thoughts on that.

3) Enlarging works, but two comments:

a) Make sure to use the "circle" shape in the implementation, not the "pin" shape:

ImplementationvsDesign
Screenshot_20240108-130338.png (2×1 px, 144 KB)
image.png (1×752 px, 772 KB)

b) Enlarging items should sync with the information in the title bar.

Meaning that if e.g. if "Switzerland" is active, and written out in the search field at the top, the pin should be enlarged:

Screenshot_20240108-130838.png (2×1 px, 237 KB)

If a user taps outside of the bottom sheet, the item should be small again and the information in the title bar at the top should be reset, like this:

Screenshot_20240108-131030.png (2×1 px, 143 KB)

4) Only show the x (reset) when the input contains a string (not always):

{F41662927}

Hi @scblr

Sorry it took long to work on this. Thank you for the review:

Fixed 1 - Now when you search, you will be taken to the article's location, and then the bottom sheet opens up.

For 2 - I was not able to put in this fix. The reason that the search was working for only few search results, is that if the search result was from tabs, history, or lists, then those results might not have a location associated with it since we did not save them with it. So it would take a lot more work to make this happen. Something like how we did during creation of default reading lists, we might have to run a one time code to update locations for all saved search results, and after a while code this, or make more api calls for items from tabs, history etc. So in this build i have just coded the logic such that when you enter search screen from Places, it always treats it like a brand new search and ignores results from tabs, history, lists. Hope that is fine. Please let me know.

Fixed 3 - Now the search hint string is updated according to chosen v/s not chosen markers.

Fixed 4 - This fix is somewhat related to 3, so should be fixed, but the related image doesnt have right permissions so I wasnt able to verify. Please let me know.

Thank you.

Thanks @Sharvaniharan!

Under the assumption that this is the correct APK:

https://github.com/wikimedia/apps-android-wikipedia/actions/runs/7564940468

Here’s some feedback:

1) Close X is visible on the first launch of the feature, it should only be shown when there’s a value in the search field

Screenshot_20240118-134433.png (2×1 px, 1 MB)

Please make sure to point me to the correct APK in the future (the one in the task’s description is outdated) 🤗

2) Please keep this on 1 line and truncate it with an ellipsis rather than 2 lines

Screenshot_20240118-135036 copy.png (2×1 px, 543 KB)

3)

Video: https://www.dropbox.com/scl/fi/n2mrhy4qumudq7qk3y2vv/screen-20240118-135045.mp4?rlkey=7w5y3681hphmfot5lf7mx6fyy&dl=0

Dismissing the bottom sheet (swiping it down or tapping anywhere on the map) should

  • Remove the value in the search field
  • Disable the active state of the marker (apply small size, not big)
  • If another marker is tapped in this state, that marker should be active (active bottom sheet, shown value in the search + bigger marker)

4)

Screenshot_20240118-153516.png (2×1 px, 565 KB)

Same goes vice-versa: tapping the close x in this state or tapping the anywhere on the map should:

  • Dismiss the bottom sheet
  • Disable the active state of the marker (apply small size, not big)
  • If another marker is tapped in this state, that marker should be active (active bottom sheet, shown value in the search + bigger marker)

5) Language filter screen seems to be in the old style here:

Screenshot_20240118-153957.png (2×1 px, 47 KB)

Probably fixed in T351397 ?

6)

For 2 - I was not able to put in this fix. The reason that the search was working for only few search results, is that if the search result was from tabs, history, or lists, then those results might not have a location associated with it since we did not save them with it. So it would take a lot more work to make this happen. Something like how we did during creation of default reading lists, we might have to run a one time code to update locations for all saved search results, and after a while code this, or make more api calls for items from tabs, history etc. So in this build i have just coded the logic such that when you enter search screen from Places, it always treats it like a brand new search and ignores results from tabs, history, lists. Hope that is fine. Please let me know.

Ok, that is fine and could something for V2.

Hi @scblr

Sorry for the apk mix-up. Here is the link to test recent changes: https://github.com/wikimedia/apps-android-wikipedia/pull/4182/checks :-)

1-4 have been fixed. Thank you @cooltey Your link preview PR fixed the major part of it.
Yes, 5 was on a separate branch, but since it was merged, now you should be able to see all changes on this same apk!
6 - Thank you!

Thanks, @Sharvaniharan and @cooltey – we are close now! 🥰

1)

Screenshot_20240119-133932 copy.png (2×1 px, 1019 KB)

Question for this state: The blue marker is active (Arosa). It is currently not supported to tap directly on the red items from here. E.g. accessing another marker, initiating the search, or switching the language requires 2 taps instead of 1.

Check out the Places implementation on iOS in this video for comparison, where exploring other markers and features is possible in 1 tap and makes exploring very convenient for users.

Is there any chance we could achieve this on Android too?

2) There’s a visual issue with certain locations:

Screenshot_20240119-140536.png (2×1 px, 753 KB)
Screenshot_20240119-140511.png (2×1 px, 681 KB)

This example is the "Biarritz" article. Tapping the item enlarges the marker as it should, but a green circle below it is visible. Here’s a screen recording in case you need more details on this bug.

Question for this state: The blue marker is active (Arosa). It is currently not supported to tap directly on the red items from here. E.g. accessing another marker, initiating the search, or switching the language requires 2 taps instead of 1.
Is there any chance we could achieve this on Android too?

Unfortunately not. The link preview is a modal dialog. For the same reason you can't tap on another link in an article while a link preview is shown.

About the 2 visual issue, I was not able to reproduce the issue @scblr : https://youtube.com/shorts/9xbJ3m6IN4Y
We have been making many prs to generally improve code and performance of the feature, so one of them might have inadvertently fixed the issue?
Please try with the latest build from here: https://github.com/wikimedia/apps-android-wikipedia/pull/4182/checks
If you are still having issues with some locations, please let me know.
Thank you. :-)

@Dbrant

Question for this state: The blue marker is active (Arosa). It is currently not supported to tap directly on the red items from here. E.g. accessing another marker, initiating the search, or switching the language requires 2 taps instead of 1. (...)

Unfortunately not. The link preview is a modal dialog. For the same reason you can't tap on another link in an article while a link preview is shown.

I've experienced the behavior described in T351158#9472534 in Google Maps for Android and am keen to understand what they are doing differently.

Check out this video:
https://www.dropbox.com/s/8u5pp0eoh9qteas/screen-20240122-130000.mp4?dl=0

Could you help me understand the components contributing to its ease of use? What are they doing differently?

Thanks!

@Sharvaniharan

About the 2 visual issue, I was not able to reproduce the issue @scblr : https://youtube.com/shorts/9xbJ3m6IN4Y
We have been making many prs to generally improve code and performance of the feature, so one of them might have inadvertently fixed the issue?
Please try with the latest build from here: https://github.com/wikimedia/apps-android-wikipedia/pull/4182/checks
If you are still having issues with some locations, please let me know.
Thank you. :-)

Ok, thanks for investigating!

@Dbrant, per our discussion, please no longer remove the dark overlay when the preview sheet is active.