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

Player Size: full window with theater mode hides player after search #1555

Open
sarim opened this issue Jan 31, 2023 · 16 comments
Open

Player Size: full window with theater mode hides player after search #1555

sarim opened this issue Jan 31, 2023 · 16 comments
Labels
Completition / Revision Rethink, complete, improve, tweak our feature or structure. Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant.

Comments

@sarim
Copy link

sarim commented Jan 31, 2023

BUG:
If you click on youtube search box, Then click outside somewhere, video player gets hidden.

HOW:

  1. From extension option set Player Size: Full Window, Forced Teather Mode
  2. Open a youtube video.
  3. Click on youtube search box, maybe type something. DO Not click on any result.
  4. Scroll down, click on a empty spot (NOT on any link) somewhere, in comment section or sidebar etc...

EXPECTED (/preferred) behavior:
Video keep showing.

Screenshots:
Screencap:

Screenshot.2023-02-01.04.38.15.mp4

Setup:

⚬ ImprovedTube Version: 4.0.17
⚬ Browser: Google Chrome 109.0.5414.120
⚬ Settings:

{"forced_theater_mode":true,"player_size":"full_window"}

⚬ OS: Windows 11 22H2 OS Build 22621.1194
⚬ Device: Desktop Computer

@sarim sarim added Bug Bug or required update after YouTube changes help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) labels Jan 31, 2023
@dojoVader
Copy link
Contributor

When the it-header-position is set to null It breaks the video, but changing the value manually fixes it.
image

@sarim
Copy link
Author

sarim commented Feb 6, 2023

@dojoVader Can you elaborate please, changing to what value? It's always null for me, setting it to 10px / 20px etc.. doesn't solve.

@dojoVader
Copy link
Contributor

@sarim apologies for not explaining

So I debugged it when you focus out, it tries to read a property from DataSet but it comes back with a null, when a null is set, this hides the player, Here is a screenshot for more clarity.

Source: general.js
Line: 550

image

@dojoVader
Copy link
Contributor

@sarim I encountered the same issue, but when I disabled and enabled it to replicate it, I didn't get the issue again, can you confirm this on your side,

I'm trying to replicate the issue, to trace what's setting it as null.

@sutamouli12
Copy link

sutamouli12 commented Feb 7, 2023 via email

@sarim
Copy link
Author

sarim commented Feb 7, 2023

@dojoVader ah you're running it from source? I didn't dig that deeper.

I encountered the same issue, but when I disabled and enabled it to replicate it, I didn't get the issue again, can you confirm this on your side,

Issue still present on my side.

@dojoVader
Copy link
Contributor

@sarim I am going to run the extension from the store and confirm it today.

@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 7, 2023

@dojoVader currently the same

@dojoVader
Copy link
Contributor

@ImprovedTube @sarim Thanks click full_window causes the bug.

@dojoVader
Copy link
Contributor

@ImprovedTube it-position-header-original contains a null, that null is used to set the it-position-header, which causes the player to disappear, rather than null Do we default to a "normal" or "static" ?

Here is a video with a fix applied, let me know what you think

https://www.awesomescreenshot.com/video/14622583?key=30182d888bc763c9b7ca072aa99b3e95

@dojoVader
Copy link
Contributor

@ImprovedTube waiting for feedback, this code shows why it's failing so I am asking if we switch the default value from null to either "normal" or "static".

@sarim
Copy link
Author

sarim commented Feb 9, 2023

@dojoVader Another question. I'm not telling improvetube to change header style, then why the function is getting called? I think the function shouldn't even be called if there is no setting set in appearance->header section.

@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 12, 2023

thank you guys! please make a pull request anytime, for any fix or quick fix.

The bigger picture:

Player Size: Full window

"Full window" sets header size 0px.

  • But why does the bug even happen?

function shouldn't even be called if there is no setting set in appearance->header

Yes! conditions for this function to run:

BTW: Ultimately we can handle all input & shortcuts at once: #1565


default

#1685

@sarim
Copy link
Author

sarim commented Feb 12, 2023

For quick fix I added this with a tampermonkey script

document.querySelector("html").setAttribute("it-header-position", 'normal');

This seems to solve the problem for now.

@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 12, 2023

exactly. While we should also check Player Size:Full Window code or youtube DOM to investigate why it happens

aand the quick-fix for us to upload asap can be @dojoVader's or better wrapping it in another

if (headerPos) {

https://github.com/code-for-charity/ImprovedTube-for-YouTube/blob/bf7c3bc21a1848d75d44a0211e1d58e167b79f47/content-scripts/extension-context/youtube-features/general/general.js#L565-L576

}

(+ exchanging line 564 & 565 for a little optimisation.. https://github.com/code-for-charity/ImprovedTube-for-YouTube/blob/bf7c3bc21a1848d75d44a0211e1d58e167b79f47/content-scripts/extension-context/youtube-features/general/general.js#L564 )

@ImprovedTube ImprovedTube added up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ important Critical or common. Thus to prioritize Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant. Solution exists (Here or 3rd party) Exists in any extension, userscript, webapp or app. Written in JS or not Completition / Revision Rethink, complete, improve, tweak our feature or structure. labels Feb 12, 2023
@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 12, 2023

labeling this "up for grabs" since the Pull Request for the bug only requires copy paste anymore at this point.

"feature request", "completion" & "Lets focus on structure" are about the 8 tasks I defined above, which shall become new issues-threads if you will

dojoVader added a commit to dojoVader/ImprovedTube-for-YouTube that referenced this issue Feb 13, 2023
@ImprovedTube ImprovedTube removed the Bug Bug or required update after YouTube changes label Mar 16, 2023
@ImprovedTube ImprovedTube removed important Critical or common. Thus to prioritize Solution exists (Here or 3rd party) Exists in any extension, userscript, webapp or app. Written in JS or not help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) labels Nov 18, 2023
@ImprovedTube ImprovedTube removed the up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ label Nov 18, 2023
ImprovedTube pushed a commit that referenced this issue Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completition / Revision Rethink, complete, improve, tweak our feature or structure. Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant.
Projects
None yet
Development

No branches or pull requests

4 participants