Comments (4)
As a counterpoint, here's an example where the current character diffs do really well, but word diffs might not:
(before)
var lis = this.props.filePairs.map((file_pair, idx) => {
var content;
if (idx != props.selectedIndex) {
content = <a data-idx={idx} onClick={this.clickHandler} href='#'>
{file_pair.path}</a>;
} else {
content = <b>{file_pair.path}</b>
}
return <li key={idx}>{content}</li>
});
return <ul className="file-list">{lis}</ul>
(after)
var lis = this.props.filePairs.map((filePair, idx) => {
var content;
if (idx != props.selectedIndex) {
content = <a data-idx={idx} onClick={this.clickHandler} href='#'>
{filePair.path}</a>;
} else {
content = <b>{filePair.path}</b>;
}
return <li key={idx}>{content}</li>;
});
return <ul className="file-list">{lis}</ul>;
from codediff.js.
Should be fixed by e8d7b91.
from codediff.js.
The '_p' → 'P' diff isn't ideal (shows up as '_pair' → 'Pair'), but otherwise this is a big win.
from codediff.js.
cool! fwiw, I don't mind file_pair
-> FilePair
showing up as a coarser / word-level diff.
also just saw this in the wild:
word-diff would win here.
happy to see this fixed
from codediff.js.
Related Issues (18)
- Double scroll bars HOT 1
- Add a "minJumpSize" option
- It's unclear what different shades of green mean HOT 1
- Wrap long lines
- Show metadata associated with individual lines HOT 1
- Add a way to scroll/link to specific lines
- Generate code coverage
- Bad choice of diffs
- Update screenshot
- Try `word-wrap: break-word`
- Double-clicking words doesn't select them
- Blank lines not selected HOT 1
- Add a way to show some (but not all) context lines HOT 1
- Show context line in diffs HOT 2
- Diff with no changes looks broken
- Another bad diff HOT 1
- Not respecting minJumpSize
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 codediff.js.