Navigating comment/issue/PR edit history diffs with keyboard shortcuts #3965
darkred posted onGitHub
<!-- 1. Make sure your requested feature makes sense for Refined GitHub: https://github.com/sindresorhus/refined-github/issues/2960 2. Include a full URL where the feature should appear. -->
My suggestion is to add keyboard shortcuts in 'Comment edit history' diff windows, namely left and right arrows (←
, →
keys)
in order to be able to directly navigate edit revisions in the order they were made.
This issue could be considered a follow-up of #1270
My reasoning:
Ever since the Comment edit history functionality was added in GitHub (May 2018), I thought it needed improvement. The feature is as quoted:
You can now view prior revisions of a comment by clicking on the “edited” dropdown in the comment’s header. Prior revisions are displayed as rendered prose diffs, and are visible to any user that can view the comment itself
i.e. as you view a revision diff, in order to to change to its previous/next one, you have to close the current diff window (via its X
), and then select that specific change from the list of edits dropdown.
<details> <summary>Here is a screen capture:</summary>
</details>
What I suggest is, as you have a diff window open. e.g.
then, by pressing ←
, →
keys, to directly navigate to the previous/next diff.
The reason I'm asking this, is to be able to view the diffs as a direct sequence in the order they were made, and so to easier find whether/how much an issue/PR/comment has deviated through the various edit revisions.
Something I've found that I believe it's useful:
in each entry in the changes dropdown list (entries selector: details[open=""]> details-menu > ul > li > button
)
there's a data-edit-history-url
attribute containing the URL of each diff content:
<button data-edit-history-url="/user_content_edits/___some_hash___">