tournesol icon indicating copy to clipboard operation
tournesol copied to clipboard

[extension] feat: Search on youtube displays recommendations from Tournesol's search

Open lfaucon opened this issue 3 years ago • 1 comments

Display 1-2 results of Tournesol's search on Youtube search page similarly to recommendations added to the home page.

Youtube's search: Screenshot 2022-01-09 at 13 33 04

Notes:

  • Use language preference of the user
  • Example search: https://api.tournesol.app/video/?search=climate
  • If no video are returned from Tournesol nothing should be displayed
  • Elon 5 years ago is really not great on Climate Change
  • Let's try to implement it without too much code duplication

lfaucon avatar Jan 09 '22 12:01 lfaucon

Initial work was done in PR: #440 But branch is stale and we wil need to extract code from it to recover the work done.

lfaucon avatar Mar 18 '22 17:03 lfaucon

After having discussed with Adrien and Aidan:

  • we display 3 videos in a single column, the top 3 (the first three) of the back end answer (all time recommendations with the search parameter)
  • the title is click-able and redirects to the YT video
  • the thumbnail is click-able and redirects to the YT video
  • handle the dark mode, as on the Tournesol recommendations on the YT home page
  • use English only for now

Following task:

  • translate in French (the mechanism introduced by https://github.com/tournesol-app/tournesol/pull/1220 could be used)
  • display Recommended by Tournesol inside the yellow background on both the YT home page and the search results
  • display a button View more after the search results (aligned to the right) that redirects the users to the Tournesol recommendations with the same search parameter

GresilleSiffle avatar Mar 16 '23 10:03 GresilleSiffle

use English only for now

What does it mean exactly? Why is it difficult to get languages the same way as for the home page?

lfaucon avatar Mar 17 '23 19:03 lfaucon

No no, I mixed English and French in the display by mistake it was just a fix to do. I can see how it can be misinterpreted .

OoIwazaruoO avatar Mar 17 '23 19:03 OoIwazaruoO