Commit 660de61
authored
Prioritize domain matches when searching passwords (#7164)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1203822806345703/task/1209279523573208?focus=true
### Description
When searching passwords, surface items with domains matching the search
query as suggested items
### Steps to test this PR
_Pre-rquisites_
- [ ] Apply
[patch](https://app.asana.com/app/asana/-/get_asset?asset_id=1212005991463752)
- [ ] Go to Settings > Autofill dev settings > Add a few sample logins
(patch will create some usernames for example.com and logins for other
sites using an example.com address)
_Feature 1_
- [ ] Enable `autofill.prioritizeDomainMatchesOnSearch` (enabled by
default for internal)
- [ ] Go to Settings > Passwords & Autofill > Passwords
- [ ] Check there are no suggested items
- [ ] Click search icon and type "exam"
- [ ] Check login items for "cris@example.com" and
"cristina@example.com" appear as suggested
_Feature 2_
- [ ] Enable `autofill.prioritizeDomainMatchesOnSearch` (enabled by
default for internal)
- [ ] Navigate to example.com
- [ ] Access "Passwords" from the overflow menu, not settings
- [ ] Check login items for "cris@example.com" and
"cristina@example.com" appear as suggested
- [ ] Click search icon and type "exam"
- [ ] Check login items for "cris@example.com" and
"cristina@example.com" appear as suggested
- [ ] Delete query and type "cristina"
- [ ] Check only login item for "cristina@example.com" appears as
suggested
_Feature 3_
- [ ] Disable `autofill.prioritizeDomainMatchesOnSearch`
- [ ] Go to Settings > Passwords & Autofill > Passwords
- [ ] Check there are no suggested items
- [ ] Click search icon and type "exam"
- [ ] Check there are no suggested items
_Feature 4_
- [ ] Disable `autofill.prioritizeDomainMatchesOnSearch`
- [ ] Navigate to example.com
- [ ] Access "Passwords" from the overflow menu, not settings
- [ ] Check login items for "cris@example.com" and
"cristina@example.com" appear as suggested
- [ ] Click search icon and type "exam"
- [ ] Check login items for "cris@example.com" and
"cristina@example.com" appear as suggested
- [ ] Delete query and type "cristina"
- [ ] Check only login item for "cristina@example.com" appears as
suggested
### UI changes
| Before | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|1 parent 81ccf1e commit 660de61
File tree
8 files changed
+139
-35
lines changed- autofill
- autofill-api/src/main/java/com/duckduckgo/autofill/api
- autofill-impl/src
- main/java/com/duckduckgo/autofill/impl
- service
- ui/credential/management
- suggestion
- viewing
- test/java/com/duckduckgo/autofill/impl/ui/credential/management/suggestion
8 files changed
+139
-35
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
820 | 823 | | |
821 | 824 | | |
822 | 825 | | |
| 826 | + | |
823 | 827 | | |
824 | 828 | | |
825 | 829 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| 418 | + | |
| 419 | + | |
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
| |||
423 | 427 | | |
424 | 428 | | |
425 | 429 | | |
| 430 | + | |
| 431 | + | |
426 | 432 | | |
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
| 438 | + | |
| 439 | + | |
432 | 440 | | |
433 | 441 | | |
434 | 442 | | |
| |||
440 | 448 | | |
441 | 449 | | |
442 | 450 | | |
| 451 | + | |
| 452 | + | |
443 | 453 | | |
444 | 454 | | |
445 | 455 | | |
| |||
452 | 462 | | |
453 | 463 | | |
454 | 464 | | |
| 465 | + | |
| 466 | + | |
455 | 467 | | |
456 | 468 | | |
457 | 469 | | |
| |||
460 | 472 | | |
461 | 473 | | |
462 | 474 | | |
| 475 | + | |
| 476 | + | |
463 | 477 | | |
464 | 478 | | |
465 | 479 | | |
| |||
474 | 488 | | |
475 | 489 | | |
476 | 490 | | |
| 491 | + | |
| 492 | + | |
477 | 493 | | |
478 | 494 | | |
479 | 495 | | |
480 | | - | |
481 | 496 | | |
482 | 497 | | |
483 | 498 | | |
| 499 | + | |
| 500 | + | |
484 | 501 | | |
485 | 502 | | |
486 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
487 | 509 | | |
488 | 510 | | |
489 | 511 | | |
| |||
Lines changed: 81 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
54 | | - | |
55 | | - | |
| 64 | + | |
| 65 | + | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
61 | | - | |
62 | | - | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | | - | |
69 | | - | |
| 78 | + | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
75 | | - | |
76 | | - | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
82 | | - | |
83 | | - | |
| 92 | + | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
89 | | - | |
90 | | - | |
| 99 | + | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
95 | 105 | | |
96 | | - | |
97 | | - | |
| 106 | + | |
| 107 | + | |
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
106 | 116 | | |
107 | 117 | | |
108 | | - | |
109 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
110 | 143 | | |
111 | 144 | | |
112 | 145 | | |
113 | 146 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
117 | 150 | | |
118 | 151 | | |
119 | | - | |
120 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
121 | 167 | | |
122 | 168 | | |
123 | | - | |
| 169 | + | |
124 | 170 | | |
125 | 171 | | |
126 | | - | |
| 172 | + | |
127 | 173 | | |
128 | 174 | | |
129 | 175 | | |
130 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
131 | 183 | | |
132 | 184 | | |
133 | 185 | | |
| |||
0 commit comments