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

bug(YouTube - Hide search result shelf header): Search result headers showing up when searching

Open ILoveOpenSourceApplications opened this issue 1 year ago • 24 comments

Bug description

When searching for individuals with YouTube account such as artists and all, official headers are showing up in search results. Examples: Screenshot_20231213_000154_YouTube Screenshot_20231213_001742_YouTube

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.

There isn't anything called "official header" in YT ReVanced. Is this what the Hide search result shelf header toggle is supposed to hide?

KobeW50 avatar Dec 12 '23 21:12 KobeW50

There isn't anything called "official header" in YT ReVanced. Is this what the Hide search result shelf header toggle is supposed to hide?

Ah yes, I believe so too. I could be wrong.

I tried to see if it's a litho component and can be hidden via the custom filter, but using shelf_header or modern_type_shelf_header_context hides every header throughout the search UI, even hiding shorts header.

Maybe there is a buffer string that can be used with the path.

But since there is no icons in the UI header, there may not be anything in the buffer to pick out that is not localized text.

LisoUseInAIKyrios avatar Feb 21 '24 13:02 LisoUseInAIKyrios

I tried searching for mkbhd and I do not see such a header. Is this still occurring?

oSumAtrIX avatar Mar 12 '24 12:03 oSumAtrIX

Yes, it's still present.

Edit: If the user has hide shorts in feed on, then the search header is hidden.

Using the following litho+buffer string in custom filter hides the artists header as long as they have some kind of title related to song in them. ^shelf_header.eml$song

Similarly for YouTuber headers, ^shelf_header.eml$YouTuber should work as well.

We'll have to somehow find all channels with a different but generalizable key word so we can hide many with lesser number of filters. As of now the following are the ones I came across. ^shelf_header.eml$YouTuber ^shelf_header.eml$song ^shelf_header.eml$rapper ^shelf_header.eml$actor

@LisoUseInAIKyrios, is this a viable solution? We'll have to do a scoop of all possible headers and add them one by one to the filter for this to work.

It's not a viable general solution if a filter relies on identifying localized (English) text.

LisoUseInAIKyrios avatar Apr 17 '24 14:04 LisoUseInAIKyrios

Another idea, is to handle shelf_header.eml in search results with a whitelist. In other words, hide it unless it can be identified as something that is not the user detail shelf.

That would require finding unique path/buffer strings that appear in all other uses of the shelf for search.

LisoUseInAIKyrios avatar Apr 17 '24 14:04 LisoUseInAIKyrios

It's not a viable general solution if a filter relies on identifying localized (English) text.

Yeah, I did think about language being an issue when using English words as filter.

That would require finding unique path/buffer strings that appear in all other uses of the shelf for search.

Is that an easily attainable solution?

Is that an easily attainable solution?

When does the shelf show up in search results? Is it just this and Shorts? Or does it show up at other times too?

LisoUseInAIKyrios avatar Apr 17 '24 14:04 LisoUseInAIKyrios

The header shows up when searching individual persons with channel I think. Examples I have come across are any music artists (like Charlie Puth, Selena Gonez), MKBHD, Will Smith, rappers (like Eminem), etc.

Right. But does shelf_header.eml show up in the search for anything that is not Shorts or this individual person header?

If shelf_header.eml only shows up for Shorts and people, then it can hide shelf_header.eml unless the path contains Shorts specific components.

But if shelf_header.eml shows up in search for other stuff, then that other stuff needs to be identified.

LisoUseInAIKyrios avatar Apr 17 '24 15:04 LisoUseInAIKyrios

But if shelf_header.eml shows up in search for other stuff, then that other stuff needs to be identified.

It hides all types of headers, in search, in channel, in homepage (for shorts). Headers such as from the issues #6 and #2959. So yeah, there's more than just the shorts and individual person header.

Many of those can be ignored, because they do not show up in search. The search bar is now hooked so the whitelist would only apply when the shelf shows up and the search bar is on screen.

Channel pages do not show up with the search bar active, nor does anything in the feed. So the only stuff a whitelist needs to identify is search specific usage of the shelf.

Edit: these will be a problem with a whitelist, because many of these have no icon and are just as hard to identify as the user pages here. So the idea of a whitelist probably won't work just because of these.

LisoUseInAIKyrios avatar Apr 17 '24 18:04 LisoUseInAIKyrios

Ah I see, whilst it'll ignore the shelf headers in other parts except search, if search has a different type of header then that'll be an issue.

For reference.

04-22 15:25:10.220 22440 23157 D revanced: LithoFilterPatch: Searching ID: null Path: shelf_header.eml|87bbd5cf2f80c456|CellType|modern_type_shelf_header_content.eml|7b97cca7dd81f118|ContainerType| BufferStrings: American YouTuberΓ¥Ösans-serifΓ¥ÖMarques BrownleeΓ¥Ösans-serifΓ¥ÖMarques Brownlee, American YouTuberΓ¥Öeml.shelf_headerΓ¥Ö
04-22 15:28:55.827 22440 23157 D revanced: LithoFilterPatch: Searching ID: null Path: shelf_header.eml|87bbd5cf2f80c456|CellType|modern_type_shelf_header_content.eml|7b97cca7dd81f118|ContainerType| BufferStrings: American singer-songwriterΓ¥Ösans-serifΓ¥ÖCharlie PuthΓ¥Ösans-serifΓ¥ÖCharlie Puth, American singer-songwriterΓ¥Öeml.shelf_headerΓ¥Ö
04-22 15:30:02.988 22440 23157 D revanced: LithoFilterPatch: Searching ID: null Path: shelf_header.eml|87bbd5cf2f80c456|CellType|modern_type_shelf_header_content.eml|7b97cca7dd81f118|ContainerType| BufferStrings: American rapperΓ¥Ösans-serifΓ¥ÖEminemΓ¥Ösans-serifΓ¥ÖEminem, American rapperΓ¥Öeml.shelf_headerΓ¥Ö
04-22 15:31:08.517 22440 23158 D revanced: LithoFilterPatch: Searching ID: null Path: shelf_header.eml|87bbd5cf2f80c456|CellType|modern_type_shelf_header_content.eml|7b97cca7dd81f118|ContainerType| BufferStrings: American actor and rapperΓ¥Ösans-serifΓ¥ÖWill SmithΓ¥Ösans-serifΓ¥ÖWill Smith, American actor and rapperΓ¥Öeml.shelf_headerΓ¥Ö