Repository navigation
Do not remove diff signs from DOM unless GitHub feature is not supported - #1451
Conversation
… default, but continue to support for GHE deployments"
|
Thanks, @KattMingMing :) |
|
@sindresorhus can you do a hotfix? |
|
Done. New version is out now. |
|
Just got the update from Mozilla's repos. Works as advertised, thank you very much! |
|
So, this PR will disable the 'remove diff signs` feature for newer versions of GitHub, but it does not fix it. What about adding the following to actually make it work again... .blob-code-marker-addition:before,
.blob-code-marker-context:before,
.blob-code-marker-deletion:before {
display: none !important;
} |
|
@jerone - GitHub implemented this feature so it's not necessary for Refined GitHub to provide that behavior on GitHub versions that already implement this as the default selection. Are you able to select the diff signs when highlighting code in a diff? |
|
@KattMingMing I thought the intention of |
According to the feature spec, the intended behavior was to make the + and - signs in diffs unselectable for easier copy-pasting. @jerone - I agree that it is redundant, but it might be there for accessibility reasons. I'm not sure. Do you want to open a feature request to remove the + and - signs entirely? |
|
Perhaps a better name would make its purpose unambiguous. |
|
@waldyrious submit a PR with the change, don't forget to add a migration step. :) |
Sure!
Any pointers to what these should look like? I haven't contributed before. |
|
Here's the announcement blog post: https://blog.github.com/changelog/2018-07-31-unselectable-diff-markers/ I guess it has been rolled out to everyone now. |
|
@KattMingMing commented on Jul 31, 2018, 11:30 PM GMT+2:
Created a feature request: #1464 |
|
Looking at the actual code, it looks like it doesn't really make the diff signs unselectable -- it seems to be removing the signs from the clipboard buffer or equivalent construct. I'm going by the code here: https://github.com/sindresorhus/refined-github/blob/ba34c09eaac05d54d5ff837edd4fbf504378a9a3/source/features/remove-diff-signs.js#L17-L18 If my interpretation is correct, then the renaming I suggested above would not make sense; at most, it could be something like |
|
|
Sounds good to me, although I'd personally favor something closer to |
This resolves #1444 so that diffs on GitHub.com are only modified if the new GitHub diff sign selection feature is not supported. This means legacy versions of GitHub will continue to support the feature via Refined GitHub and newer GitHub DOMs will use the built in support provided by GitHub.com.
This ensures that users of both GitHub.com and GitHub Enterprise (older versions) can use Refined GitHub without disabling the remove-diff-sign feature.
Also this will ensure that if GitHub reverted the change Refined GitHub will continue to work as expected.