Persist "Hide whitespace" preference across PRs #65597
Replies: 41 comments 26 replies
-
Note that this proposal already has a lot of support in the older thread: https://github.com/orgs/community/discussions/5486 |
Beta Was this translation helpful? Give feedback.
-
Personally I believe it would be even better if it was possible to set per filetype, as not ALL filetypes has whitespaces as pure cosmetics. But ignoring whitespaces should also be coupled with not seeing solo { and } with a particular indentation as a good match for synchronisation. that causes bad syncs for e.g. C# and similar. |
Beta Was this translation helpful? Give feedback.
-
Yes, please add this, at least on a per-user level. |
Beta Was this translation helpful? Give feedback.
-
At a minimum, the "Show Whitespace" toolbar button should always be visible. It shouldn't be markedly easier to show whitespace than to hide it. |
Beta Was this translation helpful? Give feedback.
-
Reviewing code is a BIG part of the time i spend on github. Hiding whitespace is such a vital feature, i don't unterstand how this cannot be a priority. You already have the functionality, just persist it 🙏 |
Beta Was this translation helpful? Give feedback.
-
My workflow literally involves manually turning on this flag on every single PR I do, because the vast majority of files I review the white-space does not matter. |
Beta Was this translation helpful? Give feedback.
-
It's amazing that a website literally for computer programmers can cause so much disruption in a programmer's flow. Please add this as a persistent option, it is annoying and slows me down having to check it every time. |
Beta Was this translation helpful? Give feedback.
-
One more vote to please oh please make this a persistent user-level (and/or repo-level) setting! It's quite rare that whitespace changes matter in our workflows; swapping the default to ignore it, would save so much time. |
Beta Was this translation helpful? Give feedback.
-
A friend directed me to this as an interim solution: https://chromewebstore.google.com/detail/git-well-soon/ehpeaofieafibmhiagianfjjblpnmbdo I.e. A chrome plugin that does exactly what we want! |
Beta Was this translation helpful? Give feedback.
-
A dev could literally implement this in a day at max. Now imagine how many human work hours are wasted by developers coming here to read through this thread, vote, and comment. |
Beta Was this translation helpful? Give feedback.
-
Please implement this. The previous thread has many comments. I heard devs complaining about this 3 years ago. It's 2024 and you have the backing of Microsoft. Please implement this. |
Beta Was this translation helpful? Give feedback.
-
This would be amazing to have! How can we get this feature prioritized? I find myself reviewing large PRs way too often, only to realize that its 95% whitespace changes. My company has strict policies on chrome extensions so that is not a viable option unfortunately. |
Beta Was this translation helpful? Give feedback.
-
+1 on request for this user-level setting to be added. |
Beta Was this translation helpful? Give feedback.
-
This is one of the most annoying daily things I do (and that says a LOT) so please please prioritize 🙏 |
Beta Was this translation helpful? Give feedback.
-
Yet another request for this. I've written my own AppleScript to add (AppleScript below if anyone wants it. I use the excellent FastScripts to give it a keyboard shortcut.) tell application "Safari"
set currentDoc to front document
set theWindow to window 1 where its document is currentDoc
tell (current tab of theWindow)
set URL to URL & "?w=1"
end tell
end tell |
Beta Was this translation helpful? Give feedback.
-
Another workaround to make it a one-click action. I wrote a tiny bookmarklet that simply adds the Save this as the url of a normal bookmark and name it whatever you like. When you're on a GH PR simply click the bookmark to apply:
|
Beta Was this translation helpful? Give feedback.
-
Having to turn this on every single PR is ridiculous. Or put it in accessibility idk, my point is we already have user settings that auto-set default values for when we are writing comments on PRs, so why can't we have this one which already has a button for it. Its not like we are asking for a new feature, just for a setting to enable it by default ! |
Beta Was this translation helpful? Give feedback.
-
I personally think it should be a project level setting, but persisting across PRs or making it a single click would be a good alternative. |
Beta Was this translation helpful? Give feedback.
-
Though I use this hiding whitespace-differences all the time, I DO understand why they hesitate with making it too easy to enable... We all want this to be a reliable tool, but we must remember that not all whitespaces are ignorable! So it could give a nasty case where a major system have some breaking changes that are not seen due to this, reviewing a PR, and later for trying to debug the changes. And they risk getting a lot of bad publicity from such a case. They want us to do it as an informed choice, knowing the risks, so we not just blindly use it! A much better (and a LOT more complex solution) would be a logical compare, that could even catch simple renames of identifiers. But that would require the file to be interpreted/compiled in a suitable matter. Currently we especially struggle in languages with block encapsulation chars like { and } that a single brace on a line with the right indentation is seen as a good match for synchronisation, where it seldom really is, and this is typically the real culprit in a compare looking garbled! So perhaps a safer - yet text-only - option would be if it detected (and displayed) a block (including subblocks) with changed indentation as one difference only. Or (as suggested elsewhere) when comparing texts, any line only containing one or more of |
Beta Was this translation helpful? Give feedback.
-
@willsmythe since you were involved in the original thread: Is there anything you guys could do to raise the priority on this? |
Beta Was this translation helpful? Give feedback.
-
Wow, 7 years later and we all still dream. |
Beta Was this translation helpful? Give feedback.
-
Copying over from the original thread asking for this feature, I wrote a small chrome extension that handles this as it doesn't seem like GH is going to provide this feature - https://chrome.google.com/webstore/detail/git-well-soon/ehpeaofieafibmhiagianfjjblpnmbdo https://github.com/orgs/community/discussions/5486#discussioncomment-4656459 |
Beta Was this translation helpful? Give feedback.
-
Another vote to persist 'Hide whitespace' the same way as 'Diff view'. |
Beta Was this translation helpful? Give feedback.
-
Is anyone from Github out there? Anybody listening to this at all? I've been assuming this was on the radar for implementation for more than half a decade given how crazy easy it would be to persist just like the "Split vs. Unified" view option. How are we still begging for this? Why is no one providing any kind of response? |
Beta Was this translation helpful? Give feedback.
-
+1 here, it's incredibly frustrating for something like this to go back to the default setting and having to change it everytime there's a new PR to reveiw. Why is this still not fixed after YEARS of ask... |
Beta Was this translation helpful? Give feedback.
-
I just spent a while looking at a changed C# file which was showing hundreds upon hundreds of changes--it was chaos. Then I hid whitespace and realized the only change was to convert from block-scoped namespace to file-scoped, which can be done with a quick action to any C# file without even knowing that it could cause reviewers potentially hours of befuddlement. Please fix this. |
Beta Was this translation helpful? Give feedback.
-
+1 here , this simple feature still hasnt been added ? its very frustrating having to do this on EVERY PR!!!! Please change. |
Beta Was this translation helpful? Give feedback.
-
I'm using the Refined Github extension and it helps that it puts the |
Beta Was this translation helpful? Give feedback.
-
There is a slight improvement. But I don't know why they didn't just fix it properly when they made this change. Now, if you check "Hide whitespace", then at least it remains that way for that project. |
Beta Was this translation helpful? Give feedback.
-
Since August 2021 (when the original discussion for this was created), I've been involved in more than 3.3k PRs on GitHub, and I've always required enabling The available browser extensions I've tried for this purpose don't eliminate the pain of this interaction, often requiring page reloads. This is a feature in many GUIs: Please provide an option to set a default for the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
Hey team, thanks for all your hard work!
What are your thoughts on persisting the "Hide whitespace" preference in diff view settings across PRs, as the Unified/Split preference is persisted? I pretty much turn "Hide whitespace" on for every diff I look at, so it'd be nice to only ever do that once :)
Upon searching for similar discussions, I found an older thread that mentioned that this setting is intended to store your preference per-diff. To maintain that functionality, "Hide whitespace" could be added as a user-level setting, defaulting to that value when looking at a PR for the fist time, then still allowing it to be set a t a per-diff level on the diff itself.
Thanks for considering!
Beta Was this translation helpful? Give feedback.
All reactions