Comments (12)
Is that reasonable at all?
from pretty-diff.
Yeah, it shouldn't be too hard to implement. Just need some time to work on it.
from pretty-diff.
Another early Christmas present for you...
I just pushed a new branch (split), which has an initial implementation for this. The code is ugly as hell, but it seems to work. The branch version just changes all diffs to be split diffs, but the real version will have an option. Play with it and see if it works for various diffs. If everything looks good, I'll get this into master with the option.
from pretty-diff.
Nice. Looks promising!
Looking at jquery/jquery-ui@b6bec79 through pretty-diff, the first difference doesn't line up, maybe due to the lines being too long? The first line on both sides wraps on my screen. This is a real problem.
Looking at qunitjs/qunit@d86d6c3 there's a blank/pale line between each of the lines on the right for the new setUrl
function. On Github, the background is just solid green, no lines in between. This is okay, though it should be just a CSS issue.
Otherwise I noticed the "file name diff", like this:
--- a/reporter/html.js
+++ b/reporter/html.js
Except now they're side-by-side. They were there before, so not really part of this issue. Could be optimized to show renames when they occur and hide this otherwise.
from pretty-diff.
Just pushed some updates. I've been thinking about changing the handling for the file names for a while. I'll tackle that separately though. Let me know if you find any problems with it now.
from pretty-diff.
I ran npm install -g scottgonzalez/pretty-diff#split
to install this again.
For this commit, I think the output is worse then before. The last change doesn't line up. That also happens for the other commits I mentioned before:
from pretty-diff.
Yeah, I broke the detection of the first line in the lookahead, so everything was off. I also just realized why GitHub is using tables for split view; it's needed to handle one side of the diff having a long line which wraps when the other side doesn't. I'll get that updated soon too.
from pretty-diff.
Looks better now. Let me know when you got this tabled, and I'll test again.
Regarding configuration: I like GitHub's model of remember the choice and using that for all diffs until I pick the other view. Maybe you can do the same on the CLI? Once I pick split view using an option, make that the default until I switch again. Like --split
and --unified
.
from pretty-diff.
This is great stuff, nice work!
I have a use for both your split
branch and your word-diff
branch. Will they eventually be usable together and published to NPM? I can make due for now, just interested in your thoughts on the project's roadmap.
from pretty-diff.
Will they eventually be usable together and published to NPM?
I'm not sure that word-diff will ever be usable. If it is, then they'll work together.
from pretty-diff.
Btw. I've been using the split view since January or so, haven't noticed any other issues.
from pretty-diff.
I don't know where my previous comment came from, I haven't actually used the split view locally...
from pretty-diff.
Related Issues (20)
- gist-diff fails on certain content
- gist-diff error - tty.setRawMode: Use `process.stdin.setRawMode()` instead. HOT 3
- Issues with producing gists HOT 5
- Include line numbers
- Soft-wrap prose documents HOT 3
- Fails when merge conflict is on deleted file HOT 3
- Word diffs HOT 3
- Improper handling of certain characters
- Suggestion: modularize into core and multiple reporter modules HOT 2
- Sub-line higlights for changes HOT 1
- Syntax highlighting
- Show "not a git repository" when run on non git folders HOT 3
- Implement autocomplete
- Cannot read property 'push' of undefined HOT 1
- gist-diff on lf v1.0.5 breaks
- Temp Directory Error on Windows HOT 1
- Got an Error: Problems parsing JSON error when doing gist-diff HOT 4
- Does not work with -C option? HOT 3
- Does not work upon comparing files that are not versioned (non git folders) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pretty-diff.