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

chips-wrapper doesn't care about the state of the header (renders even if it's hidden) #2358

Open
alexlnkp opened this issue Jun 10, 2024 · 5 comments
Labels
Completition / Revision Rethink, complete, improve, tweak our feature or structure. good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant. up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@alexlnkp
Copy link

Bug Report:

  • Description: Hiding the search bar (Header) does not hide the additional chips below the header itself
  • Steps to reproduce this: Go to Appearence>Header>Position and set to Hidden
  • Since when?: Not sure, I'd assume it has been since YouTube added these ugly chips wrapper things?
  • Browser: Librewolf (firefox)
  • Are any errors shown in the Browser-Console?: Not any related to the issue
  • Does the bug not happen when you log out of YouTube? Then please copy your experiment flags list twice Doesn't seem to matter at all if I'm logged in or out

image

  • Expected preferred behavior: Make the chips-wrapper thingy BELOW THE HEADER(!) not visible unless the search bar is visible itself.
  • ImprovedTube Version: 4.937
  • Tested as only active extension or in incognito mode?:
OS: Arch Linux x86_64
Kernel: Linux 6.8.9-arch1-2
WM: Hyprland (Wayland)

So, the chips-wrapper is an element that is used A LOT on the website, from this ugly thing below the search bar to the "sort videos by" thing on every YT channel:
image

I tried using uBlock Origin to just hide the chips:

www.youtube.com###chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

Which kind of works, but it hides EVERY chips-wrapper on the website, including the "sort by" element on the YT channels' video pages, which is not ideal at all.

Let me know if I can provide more details on the matter.

@alexlnkp alexlnkp added Bug Bug or required update after YouTube changes good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Jun 10, 2024
@ImprovedTube
Copy link
Member

ImprovedTube commented Jun 11, 2024

Hi! and thanks @alexlnkp,
@joaolscosta looked into this recently

Making your rule more specific: www.youtube.com##:matches-path(/^\/(feed\/|$)/) chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

Many of our features can also be uBlock Origin rules.
and we should support them. And or fork uBlock / part of it. Or making them crowdsource rules:
Please compare or join:
https://github.com/code-charity/crowd-fixes
code-charity/crowd-fixes#1
#2223 (comment)

@ImprovedTube ImprovedTube added Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant. Completition / Revision Rethink, complete, improve, tweak our feature or structure. and removed Bug Bug or required update after YouTube changes labels Jun 11, 2024
@alexlnkp
Copy link
Author

Making your rule more specific: www.youtube.com:matches-path(/^\/(feed\/|$)/)##chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

This doesn't seem to work or I may have misunderstood.
image

I tried adding this rule to both filters and rules in uBlock origin, but both of those appear to not work at all
Attempting to add to filters gives error Invalid filter: Bad domain name,
Attempting to add to rules doesn't give a specific error, but highlights every part of the rule with red.

I assume it is because of regex in the domain name? I've never been to knowledgeable in Web...

As for the resources You've sent - the crowd-fixes seems like a very nice idea, I'll look into it. Thanks!

@ImprovedTube
Copy link
Member

ImprovedTube commented Jun 12, 2024

now? @alexlnkp ( https://github.com/gorhill/ublock/wiki/Procedural-cosmetic-filters#subjectmatches-patharg )
seems few people in the world are too knowledgeable about uBlock rules syntax (besides it is like CSS, and "even if 1 in a million people is a regular authors of them, they could do such great work together ("crowd fixes"). ( ImprovedTube for example is just hard to keep up with when alone. )

@alexlnkp
Copy link
Author

www.youtube.com##:matches-path(/^\/(feed\/|$)/) chips-wrapper > .ytd-feed-filter-chip-bar-renderer.style-scope

now? @alexlnkp ( Wiki: Procedural cosmetic filters (subjectmatches patharg) (gorhill/ublock) )

Figured it out, thanks to You!

www.youtube.com##:matches-path(/^\/(\/|$)/)#scroll-container > .ytd-feed-filter-chip-bar-renderer.style-scope

works for me! (my main yt page isn't marked as feed for some reason, instead it's just www.youtube.com

seems few people in the world are too knowledgeable about uBlock rules syntax (besides it is like CSS, and "even if 1 in a million people is a regular authors of them, they could do such great work together ("crowd fixes"). ( ImprovedTube for example is just hard to keep up with when alone. )

I've personally got a LOT of ublock origin rules to share, not just for YT too! I'll look into how I can help others with those :)

Best,
Alex

@ImprovedTube
Copy link
Member

ImprovedTube commented Jun 13, 2024

one of us might make this a toggle at appearance>header>hide homepage tabs ? in menu skeleton/appearance.js
we write settings & path into the root element so maybe:
html[it-hide-homepage-tabs][it-path='/'] #scroll-container > .ytd-feed-filter-chip-bar-renderer.style-scope {display: none} (in js&css/.../appearance.css)

I've personally got a LOT of ublock origin rules to share, not just for YT too! I'll look into how I can help others with those :)

yay! let's go

main yt page isn't marked as feed

true

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. good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) Structures (UX) & ORG Let's focus on structure! Everything should be as easily seen/found as or where it is relevant. up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
None yet
Development

No branches or pull requests

2 participants