Refined-github: Add functionality to collapse all outdated comments when needed!

Created on 2 Nov 2018  Â·  9Comments  Â·  Source: sindresorhus/refined-github

Looks like a recent change where outdated comments have been showing up as expanded by default and I can't find a way to collapse them and only see the new comments. Please add the flexibility to see what is new and hide outdated comments.

Most helpful comment

Please add an option to hide all outdated comments when looking at a pull request. I've gotten used to not seeing outdated comments when using GitHub every day for a year, and now I find it difficult to view only comments which match current lines of code. I've been trained to view the site one way, and now the site has gone another way.

Don't tell me the way I look at code is incorrect. What's correct is what I prefer.

All 9 comments

Alt+click

The feature was in Refined GitHub already but then GitHub added it natively.

Seems like they are now available only if the comment was resolved, but the previous behavior was to toggle if outdated. Outdated but unresolved comments don't have any ways to collapse now.

https://blog.github.com/changelog/2018-10-30-outdated-comments/

if they are outdated as a result of code changes and they will no longer auto-collapse.

I see what you mean, apparently GitHub completely removed collapsible comments. Technically they did away with the concept of "outdated comment" so RGH would have to figure out which comments _are_ outdated.

Probably not feasible the same way, but it could provide a way to collapse whole reviews... but actually that's already there: "Mark conversation as resolved"

Current GitHub solution feels the correct way to collapse comments, But just that now it requires interaction from author or collaborators to mark it as resolved. Resolved comments does have alt+click to toggle all on Show resolved.

Previously change in files relevant to review comments were collapsed even if they were not resolved. May be that's why they reverted it.

GitHub's new behavior makes sense as "outdated" was often incorrect and hid important discussions. I don't think adding this feature makes sense now.

Please add an option to hide all outdated comments when looking at a pull request. I've gotten used to not seeing outdated comments when using GitHub every day for a year, and now I find it difficult to view only comments which match current lines of code. I've been trained to view the site one way, and now the site has gone another way.

Don't tell me the way I look at code is incorrect. What's correct is what I prefer.

Make sure to suggest the correct way to GitHub: https://github.com/contact

We employ the use of CI code quality tools that spit comments directly in Github - thus its actually a lot of clutter. Thus +1 for making it configurable.

(I know that alternative is to remove that CI, and hook a scanner before commit / before push, but that's not something we prioritise at the moment)

GitHub still offers a Resolve conversation button that will collapse each comment and will do so _for everyone._ Not automatic, but what you're asking is already doable.

If you feel strongly about this, I wrote a userscript to automate it for you:

for (const label of document.querySelectorAll('.file [title="Label: Outdated"]')) {
    label.closest('.file').querySelector('[data-disable-with="Resolving conversation…"]').click();
}
Was this page helpful?
0 / 5 - 0 ratings