gecko-dev/devtools/server
Razvan Caliman 0fb39bdffe Bug 1527924 - (Part 1) Use array of selectors for the rule in Redux structure for Changes. r=pbro
Refactors the Redux state for the Changes panel so that rules have
a `selectors` array instead of just a single `selector` string.

The `selectors` array represents the **history** of selector text the
rule has over time, not the actual list of multiple selectors it has
(multiple selectors are collapsed into a single comma-separated string
regardless of how many they are).

When the server logs changes, the rule's selector text is checked
against the history of previously logged selectors.

If the incoming selector is different than the _first_ item in
the tracked rule's `selectors` array, it means the selector was renamed
so it is pushed onto the array (added to the history).

If it's the same, the whole array can be reduced to the original value
because it means that either:
- the selector didn't change between operations (ex: after declaration changes)
- the selector reverted back to its original name.

This `selectors` array is used in the React component in Part 2 of this
series to render any necessary diff view of the selector.

The old approach (whole rule removal + whole rule addition) is replaced
by this refactor. The introduction of the StyleRyleActor actor id from
the server as the rule id on the client in Bug 1525238 means that the
selector change can no longer behave like two distinct rules.
The actorID/rule id are preserved after selector renames. This necessary
for the some export options to work consistently (like Copy Rule with changes applied).

Differential Revision: https://phabricator.services.mozilla.com/D19828

--HG--
extra : moz-landing-system : lando
2019-02-15 16:58:58 +00:00
..
actors Bug 1527924 - (Part 1) Use array of selectors for the rule in Redux structure for Changes. r=pbro 2019-02-15 16:58:58 +00:00
performance Bug 1489745 - Convert the preference sample-frequency-khz to hz r=ochameau,mstange 2018-10-24 12:09:37 +00:00
socket Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
startup Bug 1515290 - Instantiate DebuggerServer in dedicated loader when debugging chrome tabs. r=yulia,jdescottes 2019-01-30 08:04:50 +00:00
tests Bug 1524683 - Remove nsIFrameLoaderOwner from tests; r=nika 2019-02-15 22:20:49 +00:00
main.js Bug 1521052 - Add DebuggerServer.hasConnection to track if it still has active connections. r=jdescottes 2019-01-23 14:46:10 +00:00
moz.build Bug 1473513 - move ActorRegistry module to server/actors/utils; r=ochameau 2018-09-26 10:09:15 +02:00