Giter Site home page Giter Site logo

Comments (33)

roboweaver avatar roboweaver commented on May 23, 2024 26

The w=1 trick is nice for viewing diffs, unfortunately you can't add comments for the Pull Request which is where this would be most useful.

Really annoying to not be able to see your actual change in a file that accidentally (or intentionally) got formatted as part of a commit, since changing the whitespace doesn't matter in most languages.

from chrome-github-mate.

glynhudson avatar glynhudson commented on May 23, 2024 24

Agree, this should be default. Or at least a toggle option. Please make it happen 👍

from chrome-github-mate.

ericarnold-granular avatar ericarnold-granular commented on May 23, 2024 23

Just wanted to leave another vote to add a button to PR pages to do this. I learned of the trick using w=1, but wish there was a way to make that the default. I agree there are times when it should be flipped off, so having the button at the top of the page would be ideal.

Any chance of getting this promoted to a user pref setting that is applied automatically as the default state, then having the button to flip from there?

Thanks

from chrome-github-mate.

lekova avatar lekova commented on May 23, 2024 18

@nadim do you know if that checkbox selection can be persisted? I find myself selecting it and then the page is reloaded, the selection is gone.

from chrome-github-mate.

mlandisbqs avatar mlandisbqs commented on May 23, 2024 18

+1 for a persistent toggle - thank you!

from chrome-github-mate.

nadim avatar nadim commented on May 23, 2024 16

I love the checkbox that's been added for Hide Whitespace Changes. Can we add an option to make it the default?

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024 15

Thanks for pointing out such an useful trick 👏 , I'm sure it will help a lot of people.
In order not to confuse people who has got used to the current diff content, maybe we can add a button to enable this magic like this:

image

if you got a getter idea, glad to change.

from chrome-github-mate.

riophae avatar riophae commented on May 23, 2024 5

Well done! 👍 Blazing fast!
Yes, indeed. In specific cases it would be very confusing.

I just came up with an alternative approach worth considering.

  1. A checkbox in option page setting up whether ?w=1 will be added to any diff links automatically. The checkbox is unchecked as default, as users should be clear about the function before it being enabled.
  2. Turn on the function manually. (In my opinion,) it would be without any problems in most cases.
  3. With this trick, very rarely and unfortunately, the situation that no changes couldn't be shown is possible. And there is not a hint, which causes confusion. Okay. How about appending a hint into the page, leading user to the normal diff page?
  4. Even more advanced (and radically), user could be redirected to the page without ?w=1 automatically, then we can show a hint that why whitespace hiding is disabled.
  5. However, automatical redirecting is VERY RISKY. Please avoid of using it as far as possible.

May be a bit opinionated... or just all my fantasy :D
Thx for your patience!

from chrome-github-mate.

alamothe avatar alamothe commented on May 23, 2024 5

Is it supported to persist the setting across PRs?

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024 3

@ArtS @amit133 fixed in v0.16.5

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024 2

Finally this feature comes out. Will toggle between Show Spaces and Ignore Spaces like
image

image

from chrome-github-mate.

ArtS avatar ArtS commented on May 23, 2024 2

Is this ever going to be available in Pull Requests?

from chrome-github-mate.

mustafaozhan avatar mustafaozhan commented on May 23, 2024 2

+1 for persistency, I want it to be saved as my user preference, so I will not have to enable it for each PR I am reviewing

from chrome-github-mate.

dcumings avatar dcumings commented on May 23, 2024 1

+1 for persistency.
Found this in the short term:
https://chrome.google.com/webstore/detail/github-whitespace/fnpkdafamnbjoldglihkjjdicofghccm/related?hl=en-US

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

A diff which may confuse people with this trick without a hint
https://github.com/angular/angular.js/pull/10539/files?w=1

from chrome-github-mate.

mattsfrey avatar mattsfrey commented on May 23, 2024

Is there any consideration for this still? Having an option to default PR's to not showing whitespace diffs would be extremely useful, especially for those of us writing clojure and aligning maps values, as an example. We get diffs that are often 50% or more just whitespace and have been having to manually append the ?w=1 to our PR URLS.

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

Prepare to add this but don't get a time, PR is welcomed.

from chrome-github-mate.

riophae avatar riophae commented on May 23, 2024

Seems it's not applied to commit details page? I didn't see a "Ignore Spaces" button there.

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

Released v0.16.3 to fix this

from chrome-github-mate.

amit133 avatar amit133 commented on May 23, 2024

I am not able to see this feature
image

Check amit133/KTAB@0dbcf5a#diff-e4cd2a6be7b63a3b123aa8476c2456d1

from chrome-github-mate.

meisertedu avatar meisertedu commented on May 23, 2024

Are team would get alot of use from the menu/button option for selecting "no spaces" in diff when doing PRs. One common use-case for us is Jenkins often changes spaces/tabs to files automatically... which then leads to lots of file diff segments that are not "real" diffs. This button suggestion above would be great in the PR Files Changed tab/section.

from chrome-github-mate.

phicharp avatar phicharp commented on May 23, 2024

Any time estimate for when this will finally make it?
Hopefully ignoring spaces will not ignore leading white spaces in python?

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

Better to turn 'Hide Space' off in python code @phicharp

from chrome-github-mate.

phicharp avatar phicharp commented on May 23, 2024

@camsong : we are moving a rather old project to using autopep8 and many spaces are removed (old style was with spaces after and before parentheses, around "=" etc...) and it is quite painful to see "real changes" if any, so hiding spaces is nice, but of course leading spaces are a problem...

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

@phicharp It's hard to support that. Right now, "hide space" is a feature supported by github, can not be modified.

from chrome-github-mate.

phicharp avatar phicharp commented on May 23, 2024

OK, I understand this is not easy to implement, but AFAIS it is not exposed in the web interface, is it? I manage by adding "by hand" ?w=1 to the URL but this is not really nice

from chrome-github-mate.

camsong avatar camsong commented on May 23, 2024

@ericarnold-granular Will consider about this

from chrome-github-mate.

nicolas-albert avatar nicolas-albert commented on May 23, 2024

@nadim I search and I didn't find the checkbox on a page with code changes, I have to add w=1 by hand ...
Where can I find it please ?

from chrome-github-mate.

nadim avatar nadim commented on May 23, 2024

@nicolas-albert
image

from chrome-github-mate.

nicolas-albert avatar nicolas-albert commented on May 23, 2024

@nadim oops, I haven't seen that the report was for a Chrome extension :-Z
I have installed it now 👍
Thx !

from chrome-github-mate.

nadim avatar nadim commented on May 23, 2024

What chrome extension?

I'm pretty sure this is default github behaviour. No extension required.

from chrome-github-mate.

nicolas-albert avatar nicolas-albert commented on May 23, 2024

On this kind of page, there is no button by default :
nicolas-albert/c8o_yaml_projects@bb851e5?w=1

I have installed Octo Mate to have the Ignore / Show Spaces button.

from chrome-github-mate.

YannikBartel avatar YannikBartel commented on May 23, 2024

+1 for persistent

from chrome-github-mate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.