Closed
Bug 960987
Opened 10 years ago
Closed 8 years ago
Show me the diff of what I've changed in the style editor and inspector.
Categories
(DevTools :: Style Editor, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 794237
People
(Reporter: bwinton, Assigned: gl)
References
Details
Attachments
(4 files, 1 obsolete file)
295.27 KB,
image/png
|
Details | |
92.56 KB,
patch
|
Details | Diff | Splinter Review | |
80.89 KB,
patch
|
Details | Diff | Splinter Review | |
16.92 KB,
patch
|
Details | Diff | Splinter Review |
I like to poke around in the Inspector, and I just watched shorlander poke around in the Style Editor for an hour, and it would be nice for both of us to have an easy way to see (and save) what we've changed so that we can back-port it to the source files.
Comment 1•10 years ago
|
||
By inspector, you mean the style-inspector (i.e. the rule-view), right? Cause you can make changes to the HTML markup tree too, but back-porting changes from there might be more complex since in many cases, the markup is generated and/or modified client-side via javascript. When it comes to the rule-view, I think we could definitely find ways to save a diff or something. When it comes to the style-editor, you can save on disk the file you changed directly from that tool, were you thinking of something different?
Reporter | ||
Comment 2•10 years ago
|
||
I did mean the rule-view, yes. Darrin also pointed out that I could save the file directly. (He's sitting beside me right now! ;) But… If the original file was in SASS or LESS, or if it was one of the pre-processed files from the Firefox source tree, then saving the original file isn't as helpful as seeing what I changed.
Assignee | ||
Comment 3•10 years ago
|
||
I should be done with my source outline patch today. I would like to work on this next.
Assignee | ||
Comment 4•10 years ago
|
||
Source outline requires a bit more work, but I will still be interested in working on this later.
Comment 5•10 years ago
|
||
(In reply to Gabriel L (:gluong) from comment #4) > Source outline requires a bit more work, but I will still be interested in > working on this later. Thank you Gabriel! Your work is much appreciated :)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gabriel.luong
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•10 years ago
|
||
The current plan is to implement diff annotations in the Style Editor followed by the ability to save a diff patch. The diff annotations would look similar to GitGutter (https://raw.githubusercontent.com/jisaacks/GitGutter/master/screenshot.png) which would put an icon next to the line numbers illustrating whether or not the line has been changed, added or deleted. I am leaning towards using google-diff-match-patch (https://code.google.com/p/google-diff-match-patch/) as the diff library due to the fact that it was used in the merge addon for codemirror (http://codemirror.net/demo/merge.html). I have not looked into any of the diff libraries too deeply, but some concerns would be licenses, performance and integration with codemirror. The libraries I have found so far: https://github.com/kpdecker/jsdiff https://github.com/cemerick/jsdifflib
Assignee | ||
Comment 7•10 years ago
|
||
One other consideration is how would the diff patch be generated in presentable manner.
Assignee | ||
Comment 8•10 years ago
|
||
This patch ports most of CodeMirror's merge addon, and google-diff-match-patch library. In the screenshot (https://cloudup.com/clRryAXj-ic), you can see that the single empty line illustrates a chunk of code that was deleted. In addition, lines that are modified are highlighted, and values that are modified/added also has a green underline. The next step we are planning is to remove the line markers and show markers in the line number gutter. This is illustrated in the screenshot of GitGutter for Sublime Text (https://github.com/jisaacks/GitGutter). Any feedback or suggestions before I make additional changes are very welcome.
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8433725 -
Attachment is obsolete: true
Assignee | ||
Comment 11•10 years ago
|
||
Assignee | ||
Comment 12•10 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•