tournesol
tournesol copied to clipboard
[extension] feat: Search on youtube displays recommendations from Tournesol's search
Display 1-2 results of Tournesol's search on Youtube search page similarly to recommendations added to the home page.
Youtube's search:
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
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.
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
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?
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 .