Commit 743accc
Keyword search history (FreeTubeApp#6414)
* Add search history DB integration
* Implement search history display logic and UI
* Modify search cache removal setting to remove search history as well
* Exclude current search route from history suggestions and populate input with matching query
* Modify new labels for clarity
* Fix issues detected during review
Fix focus being lost for a second during searching of search history entry causing clear text button to phase away for a moment. Fix clear text button event not being noticed by the logic in top-nav. Fix spacebar error issue by adding check in updateVisibleDataList function.
* Implement fixes from code review
Fixes clear text button to appear and stay visible when the dropdown options are visible in an ft-input. Fixes updateVisibleDataList not using trim(), thus incorrectly causing filtering of search history when space bar was used.
* Update logic to allowing storing and searching by name rather than by route
This is much more efficient for search history particularly. No need for app-specific routes and easier operations & logic due to name being the primary key for search history entries. This still allows for the route to be used as the _id for different kinds of search history (i.e., bookmarks) that could be added in the future.
* Add back clear statement
* Fix clear text button not working or appearing as active when arrowing through search history results
* Add 'Remove' option
* Implement search history entries showing up alongside YT search suggestions as queries are being typed
* Improve code commenting
* Implement code review changes
Fix preventDefault being called for arrow left/right in search input. Revert ellipsis changes for overly long search results. Adjust matching search history logic to be non-heuristic.
* Fix text overflow issue with long search history entries
* Remove 'name' field and unused DB methods
* Implement 'Remember Search History' setting and rename 'Remember History' to 'Remember Watch History'
* Apply suggestions from code review
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* Update to not show search history suggestions if 'Remember Search History' is disabled
* Update logic to make 'Enable Search Suggestions' being false still allow showing search history results
* Revert hiding old search history entries if rememberSearchHistory is disabled
* Fix searchOptions not closing in edge case
Bug scenario: 1. click search history entry, 2. click clear text button, 3. see state of searchOptions not being closeable until re-interacting with the input
* Update src/renderer/views/Search/Search.js
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* Add bolding to selected/focused 'Remove' button
---------
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>1 parent 297aba9 commit 743accc
File tree
23 files changed
+476
-55
lines changed- src
- datastores
- handlers
- main
- renderer
- components
- ft-input
- privacy-settings
- store/modules
- views/Search
- static/locales
23 files changed
+476
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| |||
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| 216 | + | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
229 | 247 | | |
230 | 248 | | |
231 | 249 | | |
| |||
311 | 329 | | |
312 | 330 | | |
313 | 331 | | |
| 332 | + | |
314 | 333 | | |
315 | 334 | | |
316 | 335 | | |
| |||
320 | 339 | | |
321 | 340 | | |
322 | 341 | | |
| 342 | + | |
323 | 343 | | |
324 | 344 | | |
325 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
221 | 251 | | |
222 | 252 | | |
223 | 253 | | |
| |||
296 | 326 | | |
297 | 327 | | |
298 | 328 | | |
| 329 | + | |
299 | 330 | | |
300 | 331 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1346 | 1391 | | |
1347 | 1392 | | |
1348 | 1393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| 584 | + | |
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
| 207 | + | |
204 | 208 | | |
205 | | - | |
206 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
207 | 230 | | |
208 | 231 | | |
209 | 232 | | |
| |||
0 commit comments