Export changes done to CSS in the rule-view and style-editor

RESOLVED DUPLICATE of bug 794237

Status

()

Firefox
Developer Tools: CSS Rules Inspector
RESOLVED DUPLICATE of bug 794237
a year ago
a year ago

People

(Reporter: pbro, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
Provide users with a way to export the changes made in the rule-view and in the style-editor, so they can easily apply them to the original sources in their code editor.

In particular, these things should be tracked:
- adding, editing, deleting code in the style-editor 
- adding, disabling, editing, deleting properties in the rule-view
- adding rules or modifying selectors in the rule-view

It should be possible to:
- know that CSS was changed
- export the changes
- revert the changes
(Reporter)

Comment 1

a year ago
Here's a high level proposal:

- The "unmodified" CSS text for each stylesheet is stored in StyleSheetActor instances. The reason this is server-side is it makes it possible to persist this across toolbox restarts.
- Changes made in the rule-view and style-editor are done via the same code path: they both just update the text of a stylesheet in StyleSheetActor, so the proposal is to just add a new method to StyleSheetActor that returns the unmodified text.
- The front-end would be responsible for: getting the unmodified text, diffing it somehow with the current text and presenting it in the UI.
- There could be an icon in the style-editor and in the rule-view that reminds users changes have been made locally. Clicking the button would bring up a panel containing the changes.

This is just a proposal, there might be other ways, especially as far as the UI goes (diffs could be shown inline in the style-editor for instance).

Updated

a year ago
See Also: → bug 794237

Comment 2

a year ago
Maybe this is a dup, I'm not sure.  Or a forward-dup since this one has a more detailed plan.
(Reporter)

Comment 3

a year ago
Ah thanks Tom. I was sure there was another bug about this, but couldn't find it.
I'll close the current bug and move my comment over.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 794237
You need to log in before you can comment on or make changes to this bug.