Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import YouTube history into the rate later list #2059

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sigmike
Copy link
Collaborator

@sigmike sigmike commented Feb 11, 2025

Description

Initial draft to import your watch history into your rate later list.

The bulk import is not done yet, so the import is very slow, but it works.

Remaining to do:

  • bulk import
  • improve the style of the status box while importing
  • translate texts
  • improve behavior when the user is not connected (currently it marks all imports as failed)

@sigmike
Copy link
Collaborator Author

sigmike commented Feb 11, 2025

Also, I added a button to the extension dropdown but it only opens a tab to the watch history, so I'm not sure it's useful.

@GresilleSiffle
Copy link
Collaborator

GresilleSiffle commented Feb 13, 2025

I'm testing the current version. It works well thank you 👍👍

Here are few things that could improve the user experience.

(1) Do not allow the users to click on the import button if they are not connected to Tournesol. For non-authenticated users, all import attempts will fail. For those users, it may look like the process is simply not working : /

Suggestions:

  • rename the button "Import history to Tournesol" (maybe it's more engaging than the current title? even if the current one is correct)
  • for non-authenticated users this button could open the login modal

(2) Add an indication showing that the process in ongoing. Because the numbers of imported videos are not updated in real time, displaying a message could prevent the users to not interrupt the process by closing the tab or refreshing.

Suggestions:

  • a simple title could be enough for now
  • later we could add an animation

Exemple with a random title (could be "Processing, please wait..." or similar)
capture

(3) Make the overlay a bit bigger, to clearly show that something is going on. I hope the users will understand it's not a dialogue box expecting an action like confirm/cancel, but more a control panel.

Also, I added a button to the extension dropdown but it only opens a tab to the watch history, so I'm not sure it's useful.

I think it can be good to display the button, it shows that the feature exists. Maybe we could rename it "Import history?".

@GresilleSiffle
Copy link
Collaborator

The videos that are already in the rate-later list appear as successfully imported, sounds good to me.

@GresilleSiffle
Copy link
Collaborator

GresilleSiffle commented Feb 13, 2025

The bulk import is not done yet, so the import is very slow, but it works.

Should we add the bulk import before releasing a first version of this feature? What do you think @amatissart ?

Without the bulk import, the API allows authenticated users to make 120 requests per minute. This is very tight for an import process. If we decide to release a first version without the bulk import, we may want to manually control the pace of the import.

I just lock myself out of tournesol.app by clicking five times on the import button. After that all import attempts fail : ]

@sigmike
Copy link
Collaborator Author

sigmike commented Feb 14, 2025

rename the button "Import history to Tournesol"

OK

for non-authenticated users this button could open the login modal

OK I'll try that.

(2) Add an indication showing that the process in ongoing.
(3) Make the overlay a bit bigger, to clearly show that something is going on.

The title is indeed needed. A loading animation would really convey that something is happening. Maybe one of the CC0 pure CSS animations at https://loading.io/css/?

Or maybe even a description of the process and a "start" button?

Should we add the bulk import before releasing a first version of this feature?

It doesn't seem very difficult to add the bulk import, so it's probably better to wait for it.

I think I'll make the current API also accept an array of IDs as input. But if you'd rather have a new entry point, tell me.

I don't know how heavy this process is to the backend. If it is, we may want a custom rate limit for this specific call (and that may warrant a specific entry point). The current version of the feature will do a call 1 second after the last request completed.

@sigmike sigmike changed the title WIP: Import YouTube history into the rate later list Import YouTube history into the rate later list Feb 18, 2025
@sigmike
Copy link
Collaborator Author

sigmike commented Feb 18, 2025

I made all the changes. It should work well, with a bulk import.

I ended up using a specific API endpoint, but it can probably be merged into the existing create endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants