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)

defect

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.
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.
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.
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."
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
Priority: -- → P1
Whiteboard: u=contributor c=wiki s=2012-07-03 p=
Whiteboard: u=contributor c=wiki s=2012-07-03 p= → u=contributor c=wiki s=2012-07-03 p=3
Friendly all aboard ping. We scheduled this one to be completed before the next sprint. How's it looking?
Whiteboard: u=contributor c=wiki s=2012-07-03 p=3 → u=contributor c=wiki s=2012-07-13 p=3
Whiteboard: u=contributor c=wiki s=2012-07-13 p=3 → u=contributor c=wiki s=2012-07-18 p=3
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?
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
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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.
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.
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.
I'm looking into pytidylib, but what's a good example doc and revision comparison with whitespace noise?
Assignee: nobody → lcrouch
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
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
Sheppy: Please take a look when you can and reopen this bug if you are still not happy with the diffs.
Version: Kuma → unspecified
Component: Website → Landing pages
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.