youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Playlist sidebar issue?

Open SingularityRS opened this issue 3 years ago • 8 comments

I've recently noticed an issue with the playlist sidebar on YouTube. The sidebar has not been consistently jumping to the current video playing. Initially I thought this might've been a YouTube issue as the sidebar is sometimes inconsistent and doesn't always jump right to the video playing.

After running some tests to see if perhaps the issue isn't just YouTube, it seems that ImprovedTube is worsening the playlist sidebar's jumping ability. I have recorded two short clips showing what happens with the extension disabled and enabled. I ran the tests on Chrome 64-bit (latest version) in Incognito mode. I am not logged in to my YouTube account either.

Clip 1 (extension disabled):

https://streamable.com/ym90xe

Clip 2 (extension enabled):

https://streamable.com/rv9o3x

The clips just show me randomly scrolling and clicking videos on my playlist. Hopefully it shows the differences clearly. In clip 1 with the extension disabled, you can see the playlist sidebar jumping ability is a lot better than clip 2. The sidebar is often on target or pretty close to the video currently playing. Once the extension is enabled, the sidebar doesn't get close to the current video. It's usually about 200 videos behind.

The issue is present on all playlists of mine. I've run the same test on Firefox as well. The exact same behaviour is observed. I've tested this on my laptop (running Windows 11 22H2) and my desktop PC (running Windows 10 22H2). It's present on both machines.

I did also try removing the extension from Chrome and then reinstalling, but it made no difference. Issue is still there.

Is there a bug with the extension, or is something else going on? Has anyone else noticed the same behaviour?

If it helps, here's a link to one of my playlists: https://www.youtube.com/playlist?list=PLrpmL9tQfFK2IGjTIY94VPf2z_w71Jgae

SingularityRS avatar Mar 29 '23 05:03 SingularityRS

Thanks, can you tell what day or what version it started with?

I can't remember exactly when I noticed it, but it hasn't been that long, maybe a week or so. I reported the issue to YouTube via Twitter when I first noticed it worsen as I thought the problem was being caused by them. This was on 22nd March 2023. So I'd say around that time is when the issue began.

SingularityRS avatar Mar 29 '23 14:03 SingularityRS

Thank you

On Wednesday, March 29, 2023, SingularityRS @.***> wrote:

Thanks, can you tell what day or what version it started with?

I can't remember exactly when I noticed it, but it hasn't been that long, maybe a week or so. I reported the issue to YouTube via Twitter when I first noticed it worsen as I thought the problem was being caused by them. This was on 22nd March 2023. So I'd say around that time is when the issue began.

— Reply to this email directly, view it on GitHub https://github.com/code-charity/youtube/issues/1646#issuecomment-1488761149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZIQEUUBGUW65ULIGPR4RZLW6RDAZANCNFSM6AAAAAAWLPJQME . You are receiving this because you are subscribed to this thread.Message ID: @.***>

suparnaghosh934 avatar Mar 29 '23 15:03 suparnaghosh934

@SingularityRS thank! And then did you use our webstore beta? Or which browser store? Or repo master?

I continued to use the main Chrome version after noticing the issue. When I first noticed it, I just put up with it because I thought it was a YouTube problem. I only just realised recently (sometime before I posted this thread) that it might be this extension doing something.

I went on Firefox, which already had ImprovedTube installed long ago and is also signed into my secondary YouTube account. I ran the tests there and got the same behaviour shown in the clips.

I also went on Chrome Incognito and ran the tests there as shown in the linked clips.

I've not tried the beta or any other versions yet. I can try them if needed.

SingularityRS avatar Mar 29 '23 16:03 SingularityRS

So I did some more testing to try identify exactly when the issue started. I downloaded a bunch of older versions from here. It seems the issue started with the 4.3 version. I tried the 3.935 version and it now behaves like clip 1 shows in the OP (with the newer versions disabled).

To be totally sure, I disabled version 3.935, enabled the 4.3 version, refreshed the page and clicked a bunch of videos in my playlist. Issue returned. Disabled the 4.3 version, enabled version 3.935, refreshed page and clicked a bunch of videos. Issue went away. I disabled version 3.935, enabled version 4.3 and refreshed the page. Issue returned again.

So it definitely seems to be an issue with version 4.3 and beyond. Hopefully this helps.

SingularityRS avatar Mar 31 '23 08:03 SingularityRS

For this issue, you have to keep clicking videos on a large playlist to see if the issue is still present. For example, if I were to navigate to https://www.youtube.com/watch?v=JcrPTtOYeik&list=PLrpmL9tQfFK1VQtaSsebJq8R6Hu6dfQty&index=269 (takes you to video 269 in one of my playlists), the sidebar will not immediately jump to the target video. It will be way off (usually 200 videos behind). This seems to be a bug with YouTube itself as it happens with or without extensions. If you keep refreshing the page, it will never jump to the target video.

If you continue to play videos in a playlist without refreshing the page, you should notice the jumping ability gets better. This is why I was constantly clicking videos in the clips I linked. It does take some time for the sidebar to jump more accurately. It's ideal to keep clicking on videos from around 200 and onwards. Do not refresh the page when testing. Just keep clicking on videos in a playlist. Do this with both no extensions and the old versions that work for me to compare the sidebar jumping ability. You should hopefully notice a difference.

When testing, the page must be refreshed if you disable/enable the extension. Ignore the initial loading as this always breaks the sidebar (seems to be a YouTube problem).

With the more recent versions of ImprovedTube, you should find that no matter how many times you click on videos in a playlist, it will always be behind. It will never get to the target. On older versions of ImprovedTube, the playlist sidebar starts jumping more accurately as more videos get played. It will sometimes be off, but only a little bit (like 20-30 videos behind or less). This is in line with the behaviour of no extensions at all.

With the affected ImprovedTube versions, it always seems to be 200 videos behind. This is behaviour that seems consistent for me. I click on video 400, and it'll be on video 200. I click video 232 and it'll be on 32.

I tried the first link and the issue was present. I tried downloading this version and the playlist sidebar behaved the same as having no extensions at all.

So while it does seem like there is an issue on YouTube's end, newer versions of ImprovedTube seem to be doing something more to further break the playlist sidebar, causing it to never jump properly. It is almost always 200 videos behind.

I noticed this problem in March, so the issue started at some point during March.

SingularityRS avatar Apr 02 '23 11:04 SingularityRS

Done some more testing.

The issue started on this version. The one before here is fine.

I've done back and forth tests to see if it's consistent and it is. The first version is always behind no matter how many times I play videos in my playlist. The second version and all those before it start off broken (due to a YouTube issue), but the jumping ability improves and is often close to the video or right on target.

SingularityRS avatar Apr 03 '23 00:04 SingularityRS

Issue seems to be the following code:

/*------------------------------------------------------------------------------
4.2.1.6 Comments position to sidebar
------------------------------------------------------------------------------*/
ImprovedTube.commentsSidebarPosition=()=>{
    console.log("from new function")
    if(ImprovedTube.storage.comments_sidebar_position){ 
        document.querySelector("#columns").appendChild(document.querySelector("#comments"),function() {
            console.log("comments and its children have been appended to columns")})
        document.querySelector("#primary-inner").appendChild(document.querySelector("#secondary"),function() {
            console.log("secondary and its children have been appended to primary-inner")})
    }else{
        document.querySelector("#columns").appendChild(document.querySelector("#secondary"))
        document.querySelector("#below").appendChild(document.querySelector("#comments"))
    }
}
/*------------------------------------------------------------------------------
4.2.2 SIDEBAR
------------------------------------------------------------------------------*/

Code is shown here

I don't know much about coding, but I thought I would try go into the new version, find where this code was and just delete it. Loaded the extension into Chrome and the sidebar is now behaving like it does with no extensions enabled.

I don't know if that's broken anything else, and I don't know what the above code really does, but at least it's narrowed down the cause.

SingularityRS avatar Apr 03 '23 00:04 SingularityRS

Just added the version with the fixes and it's OK now. It would be nice if the whole issue could be fixed in the future. I've reported the problem to YouTube several times and nothing happens. If an extension, like this one, could do something to resolve it, that's even better. This particular bug was difficult to troubleshoot at first because the playlist sidebar already has some issue consistently jumping to the video playing.

SingularityRS avatar Apr 04 '23 00:04 SingularityRS