mozilla-mobile / focus-android

⚠️ Firefox Focus (Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
2.11k stars 711 forks source link

Create a search widget #7249

Closed rtestard closed 2 years ago

rtestard commented 2 years ago

Why/User Benefit/User Problem

Android users are now used to engaging with the Google search widget in order to give the browser a signal that they desire to engage with a voice or text search directly from the home screen. For improved convenience Focus should help fulfill this use case.

What / Requirements

As a user on the home screen I can initiate a text search by clicking on the search widget. As a user on the home screen I can initiate a voice search by clicking on the search widget. As a user I can customize the size of the search widget. As a user I can add a widget to the home screen or remove it

Acceptance Criteria (how do I know when I’m done?)

rtestard commented 2 years ago

FYI legal confirmed we're good to go with this feature

rtestard commented 2 years ago

@jeffreygee Can you please provide the UX for the widget?

jonalmeida commented 2 years ago

For eng: we should try to move the Fenix search widget to AC (probably the feature-search component) in a reusable way so that we don't have to copy-paste the code.

Mugurell commented 2 years ago

We can copy-paste the Fenix code to AC as an abstract class which can then be extended on Fenix and Focus for providing their own pending intents and maybe override standardized resource ids for the app icon and content description for a11y services.

Mugurell commented 2 years ago

There is also Jetpack Glance that allows for building the widgets using compose but given that is still in alpha and we want to have a stable implementation in AC maybe we should stick with the battle tested AppWidgetProvider.

amedyne commented 2 years ago

@jeffreygee Can you provide a link to the latest designs for Focus implementation for this? Thanks!

jeffreygee commented 2 years ago

Widget mocks here: https://www.figma.com/file/nCvlz8wsL1w7dLPag32Syz/Widget?node-id=2%3A277

iorgamgabriel commented 2 years ago

The microphone will always appear on the widget . It will not be an option in settings with on/off for voice like in Fenix . Is it ok ? @rtestard @jonalmeida

rtestard commented 2 years ago

The microphone will always appear on the widget . It will not be an option in settings with on/off for voice like in Fenix . Is it ok ? @rtestard @jonalmeida

Yes this is the intention.

rtestard commented 2 years ago

When testing with app-focus-armeeeabi-v7a-debug.apk I noticed that if Focus was not closed previously and i launch a text search then the focus is not on the search bar and keyboard opened , the app only opens. Could we adjust so focus on this case is on the search bar with keyboard opened?

iorgamgabriel commented 2 years ago

If the user didn't saw the onboarding and he clicks on the search widget he will not see it, but if enters normally in the app he will see the onboarding. When the user enters in the app from search widget the keyboard will appear the focus will be on browser toolbar . @rtestard This is correct ?

rtestard commented 2 years ago

Agreed

delia-pop commented 2 years ago

Verified as fixed on the latest Focus Nightly 105.0a1 from 08/22 with Xiaomi 12 Pro (Android 12) and Lenovo Yoga Tab 11 (Android 11).

delia-pop commented 2 years ago

Verified as fixed on Focus Beta 105.0b1 as well, with Lenovo Yoga Tab 11 (Android 11).