Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Create a search widget #7249

Closed
rtestard opened this issue Jun 20, 2022 · 14 comments · Fixed by #7474
Closed

Create a search widget #7249

rtestard opened this issue Jun 20, 2022 · 14 comments · Fixed by #7474
Assignees
Labels
feature request Feature:SearchWidget Issues related to the search widget QAVerified
Milestone

Comments

@rtestard
Copy link

rtestard commented Jun 20, 2022

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?)

  • If Focus is installed I can add a search widget from the home screen (a widget is listed under the Firefox entry in the widgets menu)
  • If a widget is added to home screen I can resize it horizontally by long tapping it. As size reduces only text search becomes possible
  • If a widget is added to home screen I can remove it
  • If Focus is uninstalled the widget gets removed from the home screen
  • The widget has a focus logo, some text that signals that users can text search and a microphone icon that signals that users can voice search
  • If a user engages with text search, Focus opens with focus on the search bar and keyboard opened
  • If a user engages with voice search, the Google voice recognition capability opens to start recording the voice. After a timeout either the Google voice recognition capability prompts the user to say something (no voice was detected), or Focus opens search results for the recognized string of text (voice was detected) using the default search provider
  • Ensure widget design is extensible to allow for future addition of QR code scanning
  • Event Telemetry identifies that the application was launched using the search widget (text or voice search can be segmented)
  • Environment telemetry identifies that the search widget is installed
@rtestard
Copy link
Author

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

@rtestard
Copy link
Author

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

@jonalmeida
Copy link
Contributor

jonalmeida commented Jul 26, 2022

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

amedyne commented Aug 2, 2022

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

@jeffreygee
Copy link

@iorgamgabriel
Copy link
Collaborator

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

iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
@github-actions github-actions bot added the eng:reopen-for-qa eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged label Aug 9, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 9, 2022
@rtestard
Copy link
Author

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.

iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 11, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 11, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 16, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 17, 2022
@rtestard
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

Agreed

iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 19, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 19, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 19, 2022
iorgamgabriel added a commit to iorgamgabriel/focus-android that referenced this issue Aug 19, 2022
@mergify mergify bot closed this as completed in #7474 Aug 19, 2022
mergify bot pushed a commit that referenced this issue Aug 19, 2022
@github-actions github-actions bot added this to the 104 milestone Aug 19, 2022
@github-actions github-actions bot reopened this Aug 19, 2022
@github-actions github-actions bot added QAReady flag for test read & needed and removed eng:reopen-for-qa eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged labels Aug 19, 2022
@delia-pop
Copy link

delia-pop commented Aug 22, 2022

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 delia-pop added QAVerified and removed QAReady flag for test read & needed labels Aug 22, 2022
@gabrielluong gabrielluong modified the milestones: 104, 105 Aug 22, 2022
@delia-pop
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request Feature:SearchWidget Issues related to the search widget QAVerified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants