Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for voice search #1229

Merged
merged 3 commits into from
Aug 22, 2023
Merged

Conversation

CrisBarreiro
Copy link
Contributor

@CrisBarreiro CrisBarreiro commented Aug 21, 2023

@CrisBarreiro CrisBarreiro force-pushed the feature/cbarreiro/voice-search branch 4 times, most recently from cff91ef to 4f48e7f Compare August 21, 2023 05:57
@CrisBarreiro CrisBarreiro force-pushed the feature/cbarreiro/voice-search branch from 4f48e7f to db1509c Compare August 21, 2023 05:59
@github-actions
Copy link

Generated file outputs:

legacy
fingerprinting.json (3 more)
  • fingerprinting.json
  • protections.json
  • trackers-unprotected-temporary.txt
  • trackers-whitelist-temporary.txt

⚠️ File is identical

v1/android-config.json (1 more)
  • v1/android-config.json
  • v2/android-config.json
--- v2/android-config.json
+++ v2/android-config.json
@@ -7069,8 +7069,16 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "enabled",
+            "settings": {
+                "minVersion": 33,
+                "excludedManufacturers": []
+            }
+        },
         "webCompat": {
             "exceptions": [],
             "state": "enabled",
             "settings": {
v1/extension-brave-config.json (25 more)
  • v1/extension-brave-config.json
  • v1/extension-bravemv3-config.json
  • v1/extension-chrome-config.json
  • v1/extension-chromemv3-config.json
  • v1/extension-config.json
  • v1/extension-edg-config.json
  • v1/extension-edge-config.json
  • v1/extension-edgmv3-config.json
  • v1/extension-firefox-config.json
  • v1/extension-safarimv3-config.json
  • v1/ios-config.json
  • v1/macos-config.json
  • v1/windows-config.json
  • v2/extension-brave-config.json
  • v2/extension-bravemv3-config.json
  • v2/extension-chrome-config.json
  • v2/extension-chromemv3-config.json
  • v2/extension-config.json
  • v2/extension-edg-config.json
  • v2/extension-edge-config.json
  • v2/extension-edgmv3-config.json
  • v2/extension-firefox-config.json
  • v2/extension-safarimv3-config.json
  • v2/ios-config.json
  • v2/macos-config.json
  • v2/windows-config.json
--- v2/windows-config.json
+++ v2/windows-config.json
@@ -6331,8 +6331,12 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "disabled"
+        },
         "webCompat": {
             "exceptions": [],
             "state": "disabled"
         },
latest
v3/android-config.json
--- v3/android-config.json
+++ v3/android-config.json
@@ -7076,8 +7076,16 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "enabled",
+            "settings": {
+                "minVersion": 33,
+                "excludedManufacturers": []
+            }
+        },
         "webCompat": {
             "exceptions": [],
             "state": "enabled",
             "settings": {
v3/extension-brave-config.json (12 more)
  • v3/extension-brave-config.json
  • v3/extension-bravemv3-config.json
  • v3/extension-chrome-config.json
  • v3/extension-chromemv3-config.json
  • v3/extension-config.json
  • v3/extension-edg-config.json
  • v3/extension-edge-config.json
  • v3/extension-edgmv3-config.json
  • v3/extension-firefox-config.json
  • v3/extension-safarimv3-config.json
  • v3/ios-config.json
  • v3/macos-config.json
  • v3/windows-config.json
--- v3/windows-config.json
+++ v3/windows-config.json
@@ -6338,8 +6338,12 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "disabled"
+        },
         "webCompat": {
             "exceptions": [],
             "state": "disabled"
         },

@CrisBarreiro CrisBarreiro marked this pull request as ready for review August 21, 2023 06:33
@CrisBarreiro CrisBarreiro requested review from a team as code owners August 21, 2023 06:33
@duckduckgo duckduckgo deleted a comment from github-actions bot Aug 21, 2023
@CrisBarreiro CrisBarreiro requested a review from anikiki August 21, 2023 08:12
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@SlayterDev SlayterDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link

Generated file outputs:

legacy
fingerprinting.json (3 more)
  • fingerprinting.json
  • protections.json
  • trackers-unprotected-temporary.txt
  • trackers-whitelist-temporary.txt

⚠️ File is identical

v1/android-config.json (1 more)
  • v1/android-config.json
  • v2/android-config.json
--- v2/android-config.json
+++ v2/android-config.json
@@ -7069,8 +7069,16 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "enabled",
+            "settings": {
+                "minVersion": 33,
+                "excludedManufacturers": []
+            }
+        },
         "webCompat": {
             "exceptions": [],
             "state": "enabled",
             "settings": {
v1/extension-brave-config.json (25 more)
  • v1/extension-brave-config.json
  • v1/extension-bravemv3-config.json
  • v1/extension-chrome-config.json
  • v1/extension-chromemv3-config.json
  • v1/extension-config.json
  • v1/extension-edg-config.json
  • v1/extension-edge-config.json
  • v1/extension-edgmv3-config.json
  • v1/extension-firefox-config.json
  • v1/extension-safarimv3-config.json
  • v1/ios-config.json
  • v1/macos-config.json
  • v1/windows-config.json
  • v2/extension-brave-config.json
  • v2/extension-bravemv3-config.json
  • v2/extension-chrome-config.json
  • v2/extension-chromemv3-config.json
  • v2/extension-config.json
  • v2/extension-edg-config.json
  • v2/extension-edge-config.json
  • v2/extension-edgmv3-config.json
  • v2/extension-firefox-config.json
  • v2/extension-safarimv3-config.json
  • v2/ios-config.json
  • v2/macos-config.json
  • v2/windows-config.json
--- v2/windows-config.json
+++ v2/windows-config.json
@@ -6331,8 +6331,12 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "disabled"
+        },
         "webCompat": {
             "exceptions": [],
             "state": "disabled"
         },
latest
v3/android-config.json
--- v3/android-config.json
+++ v3/android-config.json
@@ -7076,8 +7076,16 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "enabled",
+            "settings": {
+                "minVersion": 33,
+                "excludedManufacturers": []
+            }
+        },
         "webCompat": {
             "exceptions": [],
             "state": "enabled",
             "settings": {
v3/extension-brave-config.json (12 more)
  • v3/extension-brave-config.json
  • v3/extension-bravemv3-config.json
  • v3/extension-chrome-config.json
  • v3/extension-chromemv3-config.json
  • v3/extension-config.json
  • v3/extension-edg-config.json
  • v3/extension-edge-config.json
  • v3/extension-edgmv3-config.json
  • v3/extension-firefox-config.json
  • v3/extension-safarimv3-config.json
  • v3/ios-config.json
  • v3/macos-config.json
  • v3/windows-config.json
--- v3/windows-config.json
+++ v3/windows-config.json
@@ -6338,8 +6338,12 @@
             },
             "exceptions": [],
             "state": "disabled"
         },
+        "voiceSearch": {
+            "exceptions": [],
+            "state": "disabled"
+        },
         "webCompat": {
             "exceptions": [],
             "state": "disabled"
         },

@SlayterDev SlayterDev merged commit da9d3ab into main Aug 22, 2023
@SlayterDev SlayterDev deleted the feature/cbarreiro/voice-search branch August 22, 2023 15:12
CrisBarreiro added a commit to duckduckgo/Android that referenced this pull request Oct 11, 2023
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
If your PR does not involve UI changes, you can remove the **UI
changes** section

At a minimum, make sure your changes are tested in API 23 and one of the
more recent API levels available.
-->

Task/Issue URL: https://app.asana.com/0/0/1205292240653427/f

Project: https://app.asana.com/0/72649045549333/1205122648906231/f

Depends on duckduckgo/privacy-configuration#1229

### Description
Use remote config to determine whether or not to show voice search

### Steps to test this PR

Sample 
```
    "voiceSearch": {
      "exceptions": [],
      "state": "enabled",
      "settings": {
        "minVersion": 33,
        "excludedManufacturers": [
          {
            "name": "{manufacturerName}"
          }
        ]
      }
    },
```

_Feature enabled, no excluded manufacturers, device running Android 13
-> Voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Remove all values from `excludedManufacturers`
- [x] Open the app 
- [x] Look for a microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 13 -> Voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Add a manufacturer different than the current one to
`excludedManufacturers`
- [x] Open the app 
- [x] Look for a microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 12 -> No voice search icon_
- [x] Run the app on a device with Android 12
- [x] Create a copy of remote config using the sample above
- [x] Add a manufacturer different than the current one to
`excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 13 -> No voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Add current manufacturer to `excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

_Feature disabled, no excluded manufacturers, device running Android 13
-> No voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Remove all values from `excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

---------

Co-authored-by: Marcos Holgado <marcosh@duckduckgo.com>
joshliebe pushed a commit to duckduckgo/Android that referenced this pull request Nov 7, 2023
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
If your PR does not involve UI changes, you can remove the **UI
changes** section

At a minimum, make sure your changes are tested in API 23 and one of the
more recent API levels available.
-->

Task/Issue URL: https://app.asana.com/0/0/1205292240653427/f

Project: https://app.asana.com/0/72649045549333/1205122648906231/f

Depends on duckduckgo/privacy-configuration#1229

### Description
Use remote config to determine whether or not to show voice search

### Steps to test this PR

Sample 
```
    "voiceSearch": {
      "exceptions": [],
      "state": "enabled",
      "settings": {
        "minVersion": 33,
        "excludedManufacturers": [
          {
            "name": "{manufacturerName}"
          }
        ]
      }
    },
```

_Feature enabled, no excluded manufacturers, device running Android 13
-> Voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Remove all values from `excludedManufacturers`
- [x] Open the app 
- [x] Look for a microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 13 -> Voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Add a manufacturer different than the current one to
`excludedManufacturers`
- [x] Open the app 
- [x] Look for a microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 12 -> No voice search icon_
- [x] Run the app on a device with Android 12
- [x] Create a copy of remote config using the sample above
- [x] Add a manufacturer different than the current one to
`excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

_Feature enabled, excluded manufacturers with other values, device
running Android 13 -> No voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Add current manufacturer to `excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

_Feature disabled, no excluded manufacturers, device running Android 13
-> No voice search icon_
- [x] Run the app on a device with Android 13
- [x] Create a copy of remote config using the sample above
- [x] Remove all values from `excludedManufacturers`
- [x] Open the app 
- [x] There's no microphone icon on the search bar

---------

Co-authored-by: Marcos Holgado <marcosh@duckduckgo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants