You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add functionality to expand all outdated comments at once #781
Hey everyone, first comment in this repo, so wanted to give you a big "Thank You" first for creating this great extension!
What do you think of the following small tweak for pull requests:
when hovering over the "Show outdated" text, a small popup tells you "Hold shift while clicking to expand all comments"
when shift-clicking on the "Show outdated" text, all collapsed comments expand
Alternative implementation ideas:
Have a button/text next to "Show outdated"
Use a different button combination
Why? My team is currently in the habit of manually going through all outdated comments to make sure they were implemented correctly. Sometimes those comments are outdated because of code formatting or similar. We are currently using JS via a bookmark to achieve that functionality, but it would be really nice to have this in this extension.
Very happy to try implementing this myself, but I wanted to check if this is something you might be interested in.
Reacted by yakov116, Aleks Obukhov, Sebastian Butsch, Yann, Agnes Pasztor, Waldir Pimenta and Sam Mingo
I find myself doing this often too. I feel that we should tackle this and other similar toggles via keyboard shortcut, eg cmd+click=toggle all. No UI clutter necessary.
Alternatively it could be alt+click to match macOS’ alternative behavior, and perhaps we could show the alternative actions while alt is held down i.e. all Show outdated become Show all outdated (macOS does the same)
To add to @laurenbrandstein solution, this worked for me javascript:Array.from(document.getElementsByClassName('outdated-comment')).forEach(l=>l.setAttribute('class','file js-comment-container has-inline-notes'));
@mgoveas I think the entire conversation needs to be unhidden and I have a few PRs where I have to meticulously scroll around to find these "hidden items" and click a few times and it is a pain.
Activity
fregante commentedon Oct 29, 2017
I find myself doing this often too. I feel that we should tackle this and other similar toggles via keyboard shortcut, eg
cmd+click=toggle all. No UI clutter necessary.Alternatively it could be
alt+clickto match macOS’ alternative behavior, and perhaps we could show the alternative actions whilealtis held down i.e. all Show outdated become Show all outdated (macOS does the same)fregante commentedon Oct 29, 2017
#212 is related. Maybe pressing
ialso works in the discussione tab? I’m away from keyboard nowsgabler commentedon Oct 29, 2017
I didn't find anything and I think that Github doesn't provide that feature
Here's a screenshot of the shortcuts displayed for the discussion page
laurenbrandstein commentedon Aug 2, 2018
JS bookmark for recent Github redesign:
javascript:Array.from(document.getElementsByClassName('outdated-comment')).forEach(l => l.setAttribute('open',true));jakesylvestre commentedon Aug 22, 2018
@laurenbrandstein thank you!
mgoveas commentedon Oct 1, 2018
To add to @laurenbrandstein solution, this worked for me
javascript:Array.from(document.getElementsByClassName('outdated-comment')).forEach(l=>l.setAttribute('class','file js-comment-container has-inline-notes'));haridsv commentedon Sep 30, 2019
@mgoveas I think the entire conversation needs to be unhidden and I have a few PRs where I have to meticulously scroll around to find these "hidden items" and click a few times and it is a pain.
voppe commentedon Jun 8, 2020
2020 edition.
Open all resolved:
Click all "Load More":
tekumara commentedon Jun 22, 2020
thanks @voppe that worked!
haridsv commentedon Jul 3, 2020
The solution for "Load More" is too simplistic that only works for one level (I have PRs that nest at least 10 levels), so here is my better solution: https://stackoverflow.com/a/62711702/95750
There are other solutions that I found later: