Track Changes - Track renaming of CSS selectors

RESOLVED FIXED in Firefox 65

Status

P2
normal
RESOLVED FIXED
16 days ago
3 days ago

People

(Reporter: rcaliman, Assigned: rcaliman)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 65

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(6 attachments)

(Assignee)

Description

16 days ago
This adds code to Track Changes support tracking renaming of CSS rule selectors.
(Assignee)

Updated

16 days ago
Blocks: 1503920
No longer blocks: 1429247
(Assignee)

Comment 1

15 days ago
Created attachment 9021880 [details]
Bug 1503896 - (Part 1) Add keys to React components in Changes panel; r=pbro;

This isn't strictly necessary for this patch series, but it adds an
optimization to improve performance for React rendering and solves
warnings thrown while using React in dev mode.

MozReview-Commit-ID: ujqOa9qUsd
(Assignee)

Comment 2

15 days ago
Created attachment 9021883 [details]
Bug 1503896 - (Part 2) Support tracking multiple CSS declarations in one change; r=pbro

Depends on D10582
Improves the reducer for tracking CSS changes to handle more than one
CSS declaration changed in one operation. This is a requirement for
tracking whole rule removal or whole rule addition, like it happens
when renaming a CSS selector in the Rules view.

MozReview-Commit-ID: 25pf2GRiH4D
(Assignee)

Comment 3

15 days ago
Created attachment 9021885 [details]
Bug 1503896 - (Part 3) Extract CSS rule metadata to be reused with other logging methods; r=pbro

Depends on D10584
Other methods for tracking changes need to make use of the CSS rule
metadata (selector, rule index, ancestors, etc). This extracts that
logic into an accessor on the StyleRuleActor to facilitate reuse.

The CSS rule metadata will be augmented with information about a CSS
change (declarations added or removed) before being tracked.

MozReview-Commit-ID: xXec1XgUhk
(Assignee)

Comment 4

15 days ago
Created attachment 9021887 [details]
Bug 1503896 - (Part 4) Track changes to CSS selectors; r=pbro

Depends on D10585
Renames the logChange() to logDeclarationChange() to distinguish it from the newly introduced logSelectorChange() method which tracks selector rename by logging two changes: a whole rule remove using the old selector and a whole rule insertion add using the new selector.

MozReview-Commit-ID: 9VoVMHYXumE
(Assignee)

Comment 5

10 days ago
Created attachment 9023101 [details]
Bug 1503896 - (Part 5) Add change type to change metadata and mark whole rules as added/removed; r=pbro

Depends on D10586

Adds a new `type` param to the `change` object passed from server to the client to describe the change type so we can take custom actions along the way.

For changes to rules, the client marks the whole rule as either added or removed and styles it accordingly in the Changes panel.

Change types for declarations are not used at this time, but are put in for consistency and future-proofing.
(Assignee)

Comment 6

10 days ago
Created attachment 9023102 [details]
Bug 1503896 - (Part 6) Add test for tracking changes to rule selectors; r=pbro

Depends on D11116

Comment 8

10 days ago
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1601672ee6af
(Part 1) Add keys to React components in Changes panel; r=pbro;
https://hg.mozilla.org/integration/autoland/rev/33c358d0d2c2
(Part 2) Support tracking multiple CSS declarations in one change; r=pbro
https://hg.mozilla.org/integration/autoland/rev/95ac332b63ed
(Part 3) Extract CSS rule metadata to be reused with other logging methods; r=pbro
https://hg.mozilla.org/integration/autoland/rev/0a015306cf2b
(Part 4) Track changes to CSS selectors; r=pbro
https://hg.mozilla.org/integration/autoland/rev/ecc6903c579b
(Part 5) Add change type to change metadata and mark whole rules as added/removed; r=pbro
https://hg.mozilla.org/integration/autoland/rev/10a65f18e697
(Part 6) Add test for tracking changes to rule selectors; r=pbro
You need to log in before you can comment on or make changes to this bug.