code-charity / youtube

[top~1 open YouTube & Video web-extension] Enrich your experience & choice! 🧰180+ options & clever features📌set+forget📌Longest-standing(been tough). Please join🧩us👨‍👩‍👧‍👧 ..⋮ {playback|content discovery|player|extra buttons|distractions|related videos|shorts|ads|quality|codec|full tab|full screen}
http://improvedtube.com
Other
3.4k stars 513 forks source link

Fix Search feature #1935

Open unnamed-orbert opened 7 months ago

unnamed-orbert commented 7 months ago

Was thinking here... @ImprovedTube Our project's research is a bit broken! Would it be possible to use the translation list keys as a database for searching? instead of trying to pull the IDs in the files?

unnamed-orbert commented 7 months ago

https://github.com/code-charity/youtube/pull/1916 https://github.com/code-charity/youtube/pull/1921 https://github.com/code-charity/youtube/pull/1925

ImprovedTube commented 7 months ago

oh 💡 thats what you meant. For sure, search is very simple/broken still. Only works for one word.

1886

339 #1171 #890 #1634 #1660 #1566

amamelia commented 7 months ago

I searched for a few options and they worked as intended but I encountered some strange behavior while looking for picture in picture: I searched for "pip": image The result's good and it doesn't even say pip, but a result that does say pip did not come up: image Then I tried searching for "pic" and I should have got many results but only these two showed up: image

ImprovedTube commented 7 months ago

hi @amamelia
yes, search features does too little / wrong yet.

good

seems it searches also here in the name. https://github.com/code-charity/youtube/blob/f5cdcb4572d69f06e4430e3c21bdece2f8fbc74b/menu/skeleton-parts/appearance.js#L445-L449

raszpl commented 6 months ago

use the translation list keys as a database for searching

just did that in pull request

ImprovedTube commented 6 months ago

thank you! @raszpl

ImprovedTube commented 5 months ago
raszpl commented 5 months ago

I think all those are treated as categories/menu entries leading further, like Subtitles under Player. Its not an option, its a button opening another menu.

  • [ ] include categories in search. (0 results for header. ).

yep

  • Somehow the right feature should appear when searching hide header or header hidden.

"somehow" indeed :) how? including section/menu name will lead to returning a ton of spurious results. When I search Player I want player popup, I dont want all the contents of whole Player menu all at once.

And the category path like appearance : header should be two links (breadcrumbs navigation)

Yep, I already planned to somehow make category paths clickable for faster navigation.

  • [ ] Sub features like repeat and repeat:always. Both should only appear when searching "repeat"

Its badly named. Already suggested renaming it to "Always repeat" - problem solved ;-) + We should never enable features in a way its hidden from user (always repeat without Repeat button, Cinema mode without Cinema button etc).

  • [ ] no less than 1 result needs to appear when searching "repeat xyz", filtering further can stop as soon as only the 1 result is there.

dont understand this one

ImprovedTube commented 4 months ago

I think all those are treated as categories

the whole section backup&reset is missing including the buttons: try import, cookies, reset

Yep, I already planned to somehow make category paths clickable for faster navigation.

❤️

dont understand this one

Search can stop listening to further input, once the number of results was only 1 already for the previous character entered. ( more unexpected UX focus 😅: #1565 )

"somehow" indeed :) how? ... When I search Player I want player popup, I don't want all the contents of whole Player menu all at once.

the whole path should always be searched, just like tags & synonyms (if you only search player, then you get 10 results now which are random, while 35 would be more accurate. Since it's the least specific search to make next to 'appearance')

for search, the structure can be by function only: (path & tags) function: standard options unique options (player music enjoy musician rehearse) repeat: shortcut, button, by default ("always") (player speed listening) speed: shortcut, permanent, exceptions :music, education, whitelist: gaming, sports (player capture) screenshot-file: shortcut, button, when paused for longer than: x seconds,
(player capture) screenshot-copy: shortcut, button (player capture) .gif: button, shortcut start/stop, automatically take a .gif of the most viewed 1%, if i watched it (#1463)
(youtube appearance) header: hide, transparent, hover

While the function matters most (could have more weight in search), but all words in the whole line should lead to it.

While our lists like "shortcuts" (or sub-sections "buttons") are not features / broad, but just might be convenient/a habit to go through all of them in a row. And at least "tidy/trashbin" will be appreciated all in a row. Yet this order doesn't matter for search, if search is structured by main functionality like the example.

youtube screenshot

badly named should never

(besides that most of our features yet are permanent set and forget yet and buttons are more of a work in progress #1445 )

raszpl commented 4 months ago

I think all those are treated as categories

the whole section backup&reset is missing including the buttons: try import, cookies, reset

those are all component: 'button', https://github.com/code-charity/youtube/pull/2200 but its not enough. There needs to be mechanism added that automagically closes Search results when someone clicks on a button. It will also be needed if I make Categories (Appearance > Player) clickable.

dont understand this one

Search can stop listening to further input, once the number of results was only 1 already for the previous character entered.

how? and why? what if user wants to click backspace? :)

"somehow" indeed :) how? ... When I search Player I want player popup, I don't want all the contents of whole Player menu all at once.

the whole path should always be searched, just like tags & synonyms (if you only search player, then you get 10 results now which are random

not random, those are all settings with "player" in name

, while 35 would be more accurate. Since it's the least specific search to make next to 'appearance')

This is bad, searching "player" would display whole contents of player.js and appearance.js/player submenus.

for search, the structure can be by function only: (path & tags) function: standard options unique options (player music enjoy musician rehearse) repeat: shortcut, button, by default ("always") (player speed listening) speed: shortcut, permanent, exceptions :music, education, whitelist: gaming, sports (player capture) screenshot-file: shortcut, button, when paused for longer than: x seconds, (player capture) screenshot-copy: shortcut, button (player capture) .gif: button, shortcut start/stop, automatically take a .gif of the most viewed 1%, if i watched it (#1463) (youtube appearance) header: hide, transparent, hover

While the function matters most (could have more weight in search), but all words in the whole line should lead to it.

Dont understand at all :) Start with just one example :]

One thing that annoys me is:

Search results gets closed/vanishes, but satus-header still shows Search active with "capture" search word and X. I see two options to remedy this. Easy one - leave it as is, but make clicking again on satus-header where Search is showing "capture" reopen Search results below. Complicated to implement - auto close satus-header Search, but remember searched word "capture", so next time user clicks Magnifying Glass icon it goes back to "capture" and shows results below.

raszpl commented 4 months ago

https://github.com/code-charity/youtube/pull/2201

ImprovedTube commented 4 months ago

Easy one - leave it as is, but make clicking again on satus-header where Search is showing "capture" reopen Search results below.

Yay! Or search could appear always, and listen to all non navigation word-character input permanently (said before) (Sections are just extra tags, filters; Section names and search could share the same input; etc.)

made me think of, that search could still listen to keyboard input while in a path since we don't need keyboard input.

...except😅 maybe tab, space, page-up, page-down & arrows . And + btw, advanced thoughts

ImprovedTube commented 4 months ago

not random, those are all settings with "player" in name

which is not necessarily consistent and missing relevant ones.

This is bad, searching "player" would display whole contents of player.js and appearance.js/player submenus.

bad just the most common(=irrelevant) word to search here. (still efficient enough if it showed half of all features, (maybe one would want to explore the whole list in two steps first by "player" and than by "-player"?). For a user clicking "player" is just a synonym for searching "player" (?) - So what should appear both times is approx. player.js and appearance.js/player below and more.

one example

😅. Any! Was just pondering semantics. you might have more sympathy for this considering the long term https://github.com/code-charity/youtube/issues/2251. The 2nd column "function" is most specific for the order/ranking of search results. And a match in the 5th col too, but 5th will often have only one result often. (So there could be a \<hr> and extra results also for the and col ("function") that the found unique option belongs to.
While the 3rd & 4rd col are a bit auxiliary (besides that they can be a list (the user could want the whole list for example saying "buttons" plural). And each of these thing has almost perfect synonym (by default permanent set&forget) (button switch toggle)

(1) lists / tags (2) function: (3) common options (4) less common options (5) unique options / "robots"
(player, music, enjoy, musician, rehearse) repeat: shortcut, button by default ("always")
(player, speed, listening) speed: shortcut, , permanent category-exceptions:(music, education) only by category(gaming, sports) (Feature Request)
(player, capture) screenshot-file: shortcut, button, auto, when paused for longer than: x seconds (Feature Request)
(player, capture) screenshot-copy: shortcut, button
(player, capture) .gif: button, shortcut start/stop, automatically take a .gif of the most viewed 1%, if i watched it (#1463)(Feature Request)
(youtube, appearance) header: hide transparent, hover