Skip to content

(GitHub Issue Comments) The script no longer works: it shows invalid active items, no active items and the filters don't actually toggle anything #105

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

Closed
darkred opened this issue Nov 11, 2019 · 12 comments
Labels

Comments

@darkred
Copy link
Collaborator

darkred commented Nov 11, 2019

Greetings @Mottie !

Using Chrome 78/Firefox 70 and only Tampermonkey beta 4.9.6088 and 'GitHub Issue Comments' v1.3.8.

After GitHub recently having changed so many class names,
unfortunately the 'GitHub Issue Comments' script no longer works:

  • it shows invalid active items when 'Toggle items' is disabled
  • it shows no active items when 'Toggle items' is enabled
  • the filters don't actually hide/show anything in any case.

There are no errors in Chrome Console.

I've tried various issue pages:

https://github.com/Mottie/GitHub-userscripts/issues/104
https://github.com/Mottie/GitHub-userscripts/issues/84
https://github.com/openstyles/stylus/issues/55
https://github.com/isaacs/github/issues/895

and in all cases, the above issues occur.

Also, the filters, in the rare cases when one is listed as active with 'Toggle items' enabled (e.g. in the first link its 'Reactions'),
don't actually toggle anything when clicked.

Could it be possible to make it work again?? May I assist you in any way with this?
If I'm not mistaken, unfortunately it's not a simple matter of just tweaking the CSS selectors.
( Maybe they should all be replaced with jQuery :contains() (specific string) selectors ?? )

@Mottie
Copy link
Owner

Mottie commented Nov 12, 2019

Hey @darkred!

Hmm, yeah... it looks like a bunch of selectors have changed. Thanks GitHub!

I'll try to find some time soon to get this updated. It shouldn't be too bad (famous last words), so don't worry about assisting me. The userscript isn't using jQuery either 😸.

@Mottie Mottie added the bug label Nov 12, 2019
@darkred
Copy link
Collaborator Author

darkred commented Jan 23, 2020

Hi there Mottie.

The userscript isn't using jQuery either 😸.

I've been checking this issue again and I think I wasn't expressed properly, so let me rephrase please:

I know that the userscript doesn't use jQuery:
it's just that, if I'm not mistaken, the CSS selectors of the various entry types to filter are no longer straightforward/descriptive,
e.g. for "Label Changes" it's no longer something similar to .discussion-item-labeled, .discussion-item-unlabeled that you use in the script,
and so I'm afraid the only way to make the script work again is to use jQuery's :contains() (specific string), although I know that the :contains selector is much more expensive in terms of performance than the class selectors from before.

@Mottie
Copy link
Owner

Mottie commented Jan 24, 2020

Hey sorry for not updating this issue. I've been super busy! I got back from vacation at the end of the year, and it's been non-stop work (around the house & at work).

I did start working on this issue. I didn't encounter any problems with setting the script up without using jQuery. I'll see if I can get it done next week, since I'm going out of town tomorrow, for about a week.

@Mottie
Copy link
Owner

Mottie commented Feb 16, 2020

Sorry this took me so long to get fixed. Please test it out and let me know if you find any issues.

@darkred
Copy link
Collaborator Author

darkred commented Feb 16, 2020

Thanks so much for fixing the script!! Awesome! Super!


I've noticed these issues:

@Mottie
Copy link
Owner

Mottie commented Feb 16, 2020

Hi @darkred!

Please check the reactions issue you mentioned above and in #84.

As for the PRs... ugh, somehow I thought you mean the list of PRs page. I'll take a look now.

@darkred
Copy link
Collaborator Author

darkred commented Feb 16, 2020

Please check the reactions issue you mentioned above and in #84.

I confirm both issues the reactions issue is fixed. Thank you!

As for the PRs... ugh, somehow I thought you mean the list of PRs page.

Sorry, I should have been more descriptive about that issue.

@darkred
Copy link
Collaborator Author

darkred commented Feb 17, 2020

(I just edited my comment for clarity)
You wrote:

Please check the reactions issue you mentioned above and in #84.

but my issue #84 is not also about Reactions: it's about the +1 Comments filter.
And that issue still occurs, as I describe it my last comment there:

Τhe +1 Comments doesn't show up as active/available filter in the above issue page when enabling the Only show active items toggle, even though it has content.

More details/STR:

@Mottie
Copy link
Owner

Mottie commented Feb 18, 2020

Ok, I think I fixed most of the issues; but I'm not happy with how the reviews are working.

Reviews are sometimes wrapped in an outer wrapper that includes a timeline comment with code comments. Sometimes the review wrapper includes other changes like commits and other timeline changes.

So now there are new/updated review entries:

  • Reviews (All) - hides all reviews. This also includes review requests, approvals and change requests.
  • Reviews (Outdated) - hides only outdated reviews; but may include current reviews depending on the wrapper.
  • Reviews (Resolved) - hides only resolved reviews, which usually means they are outdated. Also may include other reviews depending on the grouping
  • Reviews (Current) - hides only current reviews; but again it may include other review types...

I also ended up removing the "Diffs (outdated) comments" entry since it has become redundant with "Review (outdated)".

@darkred
Copy link
Collaborator Author

darkred commented Feb 18, 2020

Thank you for all your great work and effort! I'm grateful!

Regarding your concern on how the reviews are working,
I can only say, that you have already done the best possible! 👍


The only issue that still exists is #84:
in the latest script version the +1 Comments filter:

  • never appears to be active (i.e. that it has matching content), and
  • enabling it (after disabling the Only show active items toggle) doesn't hide any matching comments.

Example pages:
isaacs/github#253
isaacs/github#215
#84 (your "Oops" comment)

@Mottie
Copy link
Owner

Mottie commented Mar 1, 2020

Ok, please check again. I misnamed the function, so hide +1 & reactions were both broken. Both should be fixed now. 🤞

@darkred
Copy link
Collaborator Author

darkred commented Mar 1, 2020

Yes, I confirm it's fixed now. Closing both bugs now.
Thanks a lot for everything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants