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
Mark/unmark identical files as “Viewed” in the PR files tab #3045
Comments
Please define “similar files”. What’s the heuristics? |
“Similar” is hard; your code is for “identical diffs,” which is more reasonable. Just recently I pushed here a few “search/replace PRs” that would have benefited from such a feature, however some of them only had “similar” diffs. The issues I see for this are UI and performance. If the PR has many files (which is what this feature would be for), reading and comparing the diffs might not be instant. It should skip files with large diffs, which are unlikely to be identical anyway. As for the UI, how would you trigger this behavior? Maybe any simple click on “Viewed” should trigger a
|
I’ll add: I don’t think “similar” is advisable at all. Even a single character might be significant. |
Yes, you are right, "identical"/"same" would be a better word for it. I like the idea of a confirm window. Another idea might be to put a button "Mark this and 14 identical diffs" or something but that requires UI. Thank you for exploring this with me to see if we can come up with a good application for this and potentially make it an awesome feature. |
FYI: I've updated my code snippet in the description to use |
PR welcome, but it has to start from a clicked file, it shouldn't just mark "any identical diff" like the snippet in the first comment suggests. Something simple like:
Notes:
|
I originally had to do that to prevent blocking the UI from updating on large PRs but it may not necessary (especially as it seems that GitHub has improved some things related to bulk marking as “Viewed” lately) |
I have some local code I'm testing out in this extension's codebase, for large PRs there is no visual progress updating without something like |
Periodically I end up reviewing large PRs that have lots of files that have
similaridentical diffs (e.g. package rename causes imports and dependencies in package.json files to change, etc.).I realized it would be great to have a way to mark
similaridentical files as “Viewed” in the PR files tab.A neat way to invoke this could be by double-clicking a “Viewed” checkbox.
I ended up doing this through a custom search engine in Chrome for now with the below code as its "URL" (I have its keyword defined as
gh+~v
so that on my Mac all I have to do is mark a few files as “Viewed” and then typeCommand+L
+gh+#v
+Enter
and then allsimilaridentical diffs get marked as “Viewed” too; I have similar shortcuts likegh+v
to mark all files as “Viewed”,ghrd
to display rich diffs for all files, etc.).The text was updated successfully, but these errors were encountered: