Closed
Bug 764009
Opened 14 years ago
Closed 14 years ago
Kuma: Diffs of HTML source are imprecise due to whitespace changes
Categories
(developer.mozilla.org Graveyard :: Wiki pages, defect, P1)
developer.mozilla.org Graveyard
Wiki pages
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sheppy, Assigned: groovecoder)
Details
(Whiteboard: u=contributor c=wiki s=2012-07-18 p=3 t=2012-07-09)
When I edit content within a table, for example, or around divs, I seem to get a lot of imprecision, where the entire parent block is considered changed, instead of just the changes inside it.
For example, on this diff:
https://developer-dev.allizom.org/en-US/docs/CSS$compare?to=2429&from=979
I inserted one new paragraph at the top, inserted a couple of words in one table cell, deleted a couple of words and replaced them with others in another one or two cells.
Yet several divs and the table are all listed as changed in their entirety. That's not cool; it makes it impossible to see the exact changes made. This needs to be fixed.
| Reporter | ||
Comment 1•14 years ago
|
||
Looking at this further, it looks like possibly on save, the HTML is being tidied up, which results in whitespace changes that don't affect the output of the rendered HTML, but does affect the diffs in a big way. We may want to ignore these non-displayed whitespace changes while diffing, if possible. I dunno.
| Assignee | ||
Comment 2•14 years ago
|
||
yeah the new ckeditor is probably tidying up the HTML differently than the old ckeditor.
Should it block July launch? I only ask because diff viewing code could be tricksy to change.
| Reporter | ||
Comment 3•14 years ago
|
||
I desperately want to say yes, but I will say "ideally yes, but if it has to miss launch, it needs to miss it by as little as humanly possible."
Comment 4•14 years ago
|
||
Note that this bug wouldn't be very important if bug 764004 (show changes in content, not markup) was fixed.
Summary: Kuma: Diffs are imprecise → Kuma: Diffs of HTML source are imprecise due to whitespace changes
Updated•14 years ago
|
Priority: -- → P1
Whiteboard: u=contributor c=wiki s=2012-07-03 p=
Updated•14 years ago
|
Whiteboard: u=contributor c=wiki s=2012-07-03 p= → u=contributor c=wiki s=2012-07-03 p=3
Comment 5•14 years ago
|
||
Friendly all aboard ping. We scheduled this one to be completed before the next sprint. How's it looking?
Updated•14 years ago
|
Whiteboard: u=contributor c=wiki s=2012-07-03 p=3 → u=contributor c=wiki s=2012-07-13 p=3
Updated•14 years ago
|
Whiteboard: u=contributor c=wiki s=2012-07-13 p=3 → u=contributor c=wiki s=2012-07-18 p=3
Comment 6•14 years ago
|
||
Sheppy: We talked about this a bit in the meeting. Does the current diff work for you, or would you like to see it improved further?
| Reporter | ||
Comment 7•14 years ago
|
||
The diffs are better but this specific bug is not resolved; changes made to whitespace are still causing massive variances that mean the output is difficult to read.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Reporter | ||
Updated•14 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•14 years ago
|
||
Really weird thought:
I wonder if we can, on both sides of the DIFF, use some sort of HTML formatter/indenter so that whitespace is less of an issue.
| Reporter | ||
Comment 9•14 years ago
|
||
Maybe... if we could just strip irrelevant (from an HTML perspective) whitespace before the diff, that would make a lot of difference. From our perspective as writers, we don't give a damn about HTML-tidiness related whitespace. We only care about things that affect the rendered output.
Comment 10•14 years ago
|
||
Sheppy: Using an indenter would make whitespace less of an issue when compared. I think we're on the same page, just taking different routes.
| Assignee | ||
Comment 11•14 years ago
|
||
I'm looking into pytidylib, but what's a good example doc and revision comparison with whitespace noise?
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → lcrouch
| Assignee | ||
Comment 12•14 years ago
|
||
Comment 13•14 years ago
|
||
Commit pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/7e0838872f4429e3eb01822463779f2f7469f5d8
fix bug 764009 - use tidylib for cleaner html diffs
Updated•14 years ago
|
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Whiteboard: u=contributor c=wiki s=2012-07-18 p=3 → u=contributor c=wiki s=2012-07-18 p=3 t=2012-07-09
Comment 14•14 years ago
|
||
Sheppy: Please take a look when you can and reopen this bug if you are still not happy with the diffs.
Updated•14 years ago
|
Version: Kuma → unspecified
Updated•14 years ago
|
Component: Website → Landing pages
Updated•6 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•