-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
(GitHub Toggle Issue Comments) Feature suggestion: Add a toggle button to hide the filter buttons that have no content #58
Comments
Hi @darkred! I ended up switching all the check marks to toggle buttons... and I added an additional one in the header to fulfill this enhancement request! |
Thank you so much! Magnificent!! Just one thing, please:
Another example: in this current page here, Could you please make this filter get hidden too? |
The +1 comments was made to always show up. I did this because I didn't want to process the text of every comment when the script initializes. All the other filters look for a class name. Hmm, maybe it isn't a big deal if I just have it search for the first one... |
Updated. I only tested it on a few pages, please let me know if you encounter any issues. |
Her, it works fine! Thanks again!
Yes, one last thing, please: I hope it's not too much, but I'm asking this, because, exactly like with the '+1 Comments' filter, Here are example pages where the 'Reactions' filter shows up, even though there are no reactions in the pages:
|
The reactions item should only show up when there are reactions. |
Ok, you were right, I found & fixed the problem! |
It's perfect 👍 |
My suggestion is to add a toggle button to hide the filter buttons that have no content.
Depending on the page, the filters list becomes half or less, leaving only the applicable filters visible.
Example comparison:
Before
After
What I have in mind:
I'd suggest to be on the top of the filters list, to the same row as the "Toggle filters" entry:
.
like the one that uBlock Origin uses in its logger (for requests which do not originate from any specific tab):
@Mottie , what do you say?
I thought of making a PR instead of an issue,
but unfortunately I don't feel confident enough to share the needed code as a PR.
Nevertheless, hoping to facilitate you:
The quick CSS I added to the script's GM_addStyle command to get this is:
The following code seems to add the extra button ok: (I converted the eye-slash icon to base64):
On a sidenote, I've noticed
in this example page
https://github.com/Microsoft/vscode/issues/58724
that the filter "+1 Comments" gets the
.ghic-has-content
class,although there are no +1 comments in the page.
The text was updated successfully, but these errors were encountered: