Commit cead15b
authored
SERP Settings Sync: Hide SERP duck.ai toggle (#7153)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1207908166761516/task/1211992919877851?focus=true
### Description
This PR adds a url parameter to hide the "Duck.ai" toggle when opening
SERP settings from Native Settings.
https://github.com/user-attachments/assets/ec3f4e8c-7131-4350-9433-f3e1315ae148
### Steps to test this PR
Apply the patch found
[here](https://app.asana.com/1/137249556945/task/1211992919877854?focus=true):
_SERP Duck.ai toggle hidden_
- [x] Enable the `hideAiGeneratedImagesOption` feature flag
- [x] Open "AI Features" in Native Settings
- [x] Click "Search Assist Settings"
- [x] Scroll up
- [x] The SERP Duck.ai toggle should **not** be visible
- [x] Press back
- [x] Click "Hide AI generated Images"
- [x] Scroll up
- [x] The SERP Duck.ai toggle should **not** be visible
_Feature Flag off behaviour_
- [x] Remove the patch
- [x] Disable the `hideAiGeneratedImagesOption` feature flag (you may
need to remove @InternalAlwaysEnabled from the feature toggle in code)
```
Index: settings/settings-api/src/main/java/com/duckduckgo/settings/api/SettingsPageFeature.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/settings/settings-api/src/main/java/com/duckduckgo/settings/api/SettingsPageFeature.kt b/settings/settings-api/src/main/java/com/duckduckgo/settings/api/SettingsPageFeature.kt
--- a/settings/settings-api/src/main/java/com/duckduckgo/settings/api/SettingsPageFeature.kt (revision 5244965)
+++ b/settings/settings-api/src/main/java/com/duckduckgo/settings/api/SettingsPageFeature.kt (date 1763588843129)
@@ -32,7 +32,6 @@
fun embeddedSettingsWebView(): Toggle
@Toggle.DefaultValue(DefaultFeatureValue.FALSE)
- @Toggle.InternalAlwaysEnabled
fun hideAiGeneratedImagesOption(): Toggle
@Toggle.DefaultValue(DefaultFeatureValue.FALSE)
```
- [x] Open "AI Features" in Native Settings
- [x] Click "Search Assist Settings"
- [x] The SERP Duck.ai toggle **should** be visible
### UI changes
No UI changes, only backend URL and logic updates.1 parent 252a109 commit cead15b
File tree
2 files changed
+71
-7
lines changed- duckchat/duckchat-impl/src
- main/java/com/duckduckgo/duckchat/impl/ui/settings
- test/kotlin/com/duckduckgo/duckchat/impl/ui/settings
2 files changed
+71
-7
lines changedLines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
149 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
| |||
220 | 229 | | |
221 | 230 | | |
222 | 231 | | |
223 | | - | |
224 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
225 | 237 | | |
226 | 238 | | |
Lines changed: 54 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
| |||
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
300 | | - | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
308 | 342 | | |
309 | 343 | | |
310 | 344 | | |
| |||
557 | 591 | | |
558 | 592 | | |
559 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
560 | 612 | | |
0 commit comments