revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

bug (YouTube): `Hide info panels` hides panel that should not be hidden

Open KobeW50 opened this issue 1 year ago • 3 comments

Bug description

App/Patches info

App: YouTube v19.11.43 Patches: v4.8.2

Bug details

The Hide info panels option (found in Settings > ReVanced > Player) also hides the following section on the page that appears when you search about "suicide".

Screenshot_20240529_150840

Why this is a bug

This panel should not be hidden for 2 reasons:

  1. The Hide info panels option is found in the Player settings, so it should only hide panels in the player.

  2. When the panel (shown above) is hidden, it is impossible to view the search results. So by hiding it, it is only an annoyance rather than a useful feature. At the very least, there should be a warning about this downside in the toggle description.

Error logs

No response

Solution

No response

Additional context

No response

Acknowledgements

  • [X] This issue is not a duplicate of an existing bug report.
  • [X] I have chosen an appropriate title.
  • [X] All requested information has been provided properly.

KobeW50 avatar May 29 '24 19:05 KobeW50

Does this issue still show up? I cannot reproduce it (it never shows the "you are not alone" warning).

LisoUseInAIKyrios avatar Aug 24 '24 06:08 LisoUseInAIKyrios

The issue still occurs on YT 19.16.39 with patches v4.13.3

I'm guessing the warning only appears in countries where there that suicide hotline functions

KobeW50 avatar Aug 25 '24 01:08 KobeW50

I was able to reproduce it on a different account.

It appears filtering just |information_panel.eml hides 2019 disease warnings, and the 'show anyways' is not hidden as desired.

The | is needed for the filter to not hide single_item_information_panel.eml (which incorrectly hides the 'show anyways' button).

Not sure if this change works for other usage of info panel, because these two use cases are all I can find where it pops up.

This setting should also be moved to General since it shows up in the feed and in the player.

Edit: some additional filters are needed to hide some components that are no longer filtered, such as publisher_transparency_panel.eml. there is likely additional unidentified components as well.

LisoUseInAIKyrios avatar Aug 25 '24 01:08 LisoUseInAIKyrios

@KobeW50 It's just a test code but...try it anyway:

Define a variable outside method:

private static int frictionPanelState = 0;

Add the following in the method instead:

//---------------------------------Friction Panel------------------------------------//
        if (combinedTemplates.contains("cell_divider")) {
            frictionPanelState = 1;
        } else if (combinedTemplates.contains("single_item_information_panel")) {
            if (frictionPanelState == 1) {
                frictionPanelState = 2;
            }

            return frictionPanelState == 2;
        } else if (!combinedTemplates.contains("null") &&
                    !combinedTemplates.contains("search_friction")) {
                        frictionPanelState = 0;
        }
        //-----------------------------------------------------------------------------------//

0xrxL avatar Oct 06 '24 13:10 0xrxL

It's just a test code but...try it anyway:

Due to time contraints and lack of knowledge I'm unable to make my own patches to test with. Thank you for your efforts. Sorry

KobeW50 avatar Oct 06 '24 17:10 KobeW50

It's just a test code but...try it anyway:

Due to time contraints and lack of knowledge I'm unable to make my own patches to test with. Thank you for your efforts. Sorry

It works on my side anyway...

This is how it appears in the search view

Image

0xrxL avatar Oct 06 '24 17:10 0xrxL

I cannot get this warning to show anymore.

LisoUseInAIKyrios avatar Feb 17 '25 10:02 LisoUseInAIKyrios

It still shows for me on 19.47.53

KobeW50 avatar Feb 17 '25 15:02 KobeW50

I was able to reproduce only once then not again. It should be fixed with https://github.com/ReVanced/revanced-patches/commit/4ac8854b99808a8957f3b0b7438e1e0cdedffbaf but I cannot completely confirm.

LisoUseInAIKyrios avatar Feb 18 '25 07:02 LisoUseInAIKyrios

Thank you. The fix works

KobeW50 avatar Mar 03 '25 13:03 KobeW50