Commit Graph

31 Commits

Author SHA1 Message Date
Victor Porof
b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Razvan Caliman
2f548d2fee Bug 1532583 - Add scalars for copy options in Changes panel. r=pbro
Track the number of times people use any of the export options from the Changes panel:

- Copy All Changes button
- Copy Rule button
- Copy Rule context menu option
- Copy Declaration context menu option

Differential Revision: https://phabricator.services.mozilla.com/D22090
2019-03-05 14:38:36 +00:00
Razvan Caliman
a41772a890 Bug 1529599 - (Part 1) Add Copy Declaration to Changes panel context menu; r=gl
Adds a new option to the context menu which is visible only when it's invoked on a CSS declaration.
Builds a string with the property name and value and copies to the clipboard.
If the declaration is marked as removed, the string is wrapped in a comment block.

Differential Revision: https://phabricator.services.mozilla.com/D21526
2019-02-28 17:30:02 +00:00
Razvan Caliman
273e5be80d Bug 1530294 - Add option to skip cache when requesting authored text for CSS rule r=gl
This patch adds a boolean option to skip the cached value of `StyeRuleActor.authoredText` and re-parse the stylesheet for its value.
When changing content of a descendant rule inside an ancestor like @media or @select, the cached `authoredText` value is outdated.
This yields incorrect data when requesting the complete rule authored text, hence the need for a cache-busting option.

In addition to this change, there is a slight refactor to include the generated unique selector for the mock-rule for element inline styles.

Differential Revision: https://phabricator.services.mozilla.com/D21033
2019-02-26 09:09:01 +00:00
Razvan Caliman
7f88bd55ca Bug 1530341 - (Part 2) Add Copy All Changes button to Changes panel. r=gl
Depends on D21007

Adds a Copy All Changes button to the toolbar of the Changes panel.
When pressed, this builds a stylesheet out of the changes for all sources tracked (stylesheets, element styles, etc)
The output format is the same as the now defunct Bug 1524548 with the added code comment as separator between the sources.

Differential Revision: https://phabricator.services.mozilla.com/D21008
2019-02-25 22:37:02 +00:00
Razvan Caliman
07349e4d6b Bug 1529606 - Add Copy Rule button to Changes panel. r=pbro
Adds a button that shows up when hovering selectors in the Changes panel.
When clicked, it invokes the same Copy Rule behavior implemented for the context menu: copies the full content of the rule with changes applied.

The added/changed CSS class names use BEM notation. I intend to refactor the Changes panel stylesheet to BEM in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D20808
2019-02-25 22:20:53 +00:00
arthur.iakab
8fcef9e3c2 Backed out 3 changesets (bug 1530341, bug 1529606) for causing devtools failures on browser_parsable_css.js CLOSED TREE
Backed out changeset 8a760030e793 (bug 1530341)
Backed out changeset 2c74db63f9aa (bug 1530341)
Backed out changeset 96e76fdfd8b2 (bug 1529606)
2019-02-25 21:35:09 +02:00
Razvan Caliman
f5a78d7792 Bug 1530341 - (Part 2) Add Copy All Changes button to Changes panel. r=gl
Depends on D20808

Adds a Copy All Changes button to the toolbar of the Changes panel.
When pressed, this builds a stylesheet out of the changes for all sources tracked (stylesheets, element styles, etc)
The output format is the same as the now defunct Bug 1524548 with the added code comment as separator between the sources.

Differential Revision: https://phabricator.services.mozilla.com/D21008
2019-02-25 17:45:47 +00:00
Razvan Caliman
b7ddd05b27 Bug 1529606 - Add Copy Rule button to Changes panel. r=pbro
Adds a button that shows up when hovering selectors in the Changes panel.
When clicked, it invokes the same Copy Rule behavior implemented for the context menu: copies the full content of the rule with changes applied.

The added/changed CSS class names use BEM notation. I intend to refactor the Changes panel stylesheet to BEM in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D20808
2019-02-25 17:45:40 +00:00
Razvan Caliman
160cea7ccd Bug 1524547 - (Part 2) Add context menu option to copy the contents of a changed CSS rule. r=gl
Depends on D20195

This series of patches depends on the patch from [Bug 1525238](https://bugzilla.mozilla.org/show_bug.cgi?id=1525238)

- adds method to identify a CSS Rule actor by id
- adds context menu option to the Changes panel to allow copying the rule's authored text to the clipboard

Differential Revision: https://phabricator.services.mozilla.com/D20196
2019-02-20 21:45:03 +00:00
Razvan Caliman
b54610cf9e Bug 1527004 - Add context menu option to Changes panel to copy all changes for a source. r=gl
Like Bug 1524548, but builds a stylesheet for all changed rules within a source.

Differential Revision: https://phabricator.services.mozilla.com/D19385
2019-02-11 20:02:44 +00:00
Razvan Caliman
9b46124531 Bug 1524548 - (Part 3) Add option to Changes panel context menu to copy changes. r-gl r=gl
Depends on D18704

Adds a new option to the context menu to copy the changes for a rule as valid CSS text.
Removed properties are commented out. Added properties are used as-is. Style source information is listed as a code comment above the CSS rule.

Makes use of the new Redux selector introduced in Part 2 (see D18704) to build a stylesheet text with the changes per-rule. That will be reused for copying all changes per-stylesheet.

Moves the copy text selection handler out to the ChangesView to co-locate it with other (upcoming) copy actions.

Adds data-ruleid and data-sourceid to DOM elements to help match the target element to the rule/source in the Redux store.

Differential Revision: https://phabricator.services.mozilla.com/D18706
2019-02-06 19:07:42 +00:00
Razvan Caliman
a933ba0da4 Bug 1522843 - Add telemetry configuration and instrumentation to Changes panel to measure usage of context menu and copy action. r=gl
Adds three new scalars for counting the numer of times:
- the default copy action is triggered, regardless of method
- the context menu is shown
- the copy option from the context menu is used

Differential Revision: https://phabricator.services.mozilla.com/D17667
2019-01-29 11:53:38 +00:00
Razvan Caliman
0ca03a9464 Bug 1518512 - (Part 1) Add basic context menu to Changes panel. r=gl
Adds context menu with options to select all and copy text content from
the Changes panel.

Differential Revision: https://phabricator.services.mozilla.com/D17255
2019-01-25 15:45:38 +00:00
Csoregi Natalia
c4c77175fd Backed out 2 changesets (bug 1518512) for devtools failures on devtools/client/inspector/changes/test/browser_changes_rule_selector.js. CLOSED TREE
Backed out changeset c8f0d19844f6 (bug 1518512)
Backed out changeset 3c03e2282b4f (bug 1518512)
2019-01-25 15:41:07 +02:00
Razvan Caliman
84c7100017 Bug 1518512 - (Part 1) Add basic context menu to Changes panel. r=gl
Adds context menu with options to select all and copy text content from
the Changes panel.

Differential Revision: https://phabricator.services.mozilla.com/D17255
2019-01-23 14:00:10 +00:00
yulia
beed920cfb Bug 1508660 - make storage front and changes front async; r=ochameau
Depends on D13110

Differential Revision: https://phabricator.services.mozilla.com/D13336
2018-12-18 08:33:11 +00:00
Ciure Andrei
3e1f01f806 Backed out 14 changesets (bug 1508660, bug 1508656, bug 1504185) for browser_target_cached-front.js perma failures CLOSED TREE
Backed out changeset 08e5ae4312b3 (bug 1508660)
Backed out changeset 01b687bb0b75 (bug 1504185)
Backed out changeset 140374b098aa (bug 1504185)
Backed out changeset caafdc0ea4c7 (bug 1508656)
Backed out changeset 8b98b777aec2 (bug 1508656)
Backed out changeset f1905a2f9b6c (bug 1508656)
Backed out changeset 8b01632f9e3d (bug 1508656)
Backed out changeset eb4c893d451e (bug 1508656)
Backed out changeset 70db61618160 (bug 1508656)
Backed out changeset dff79b73c7fe (bug 1508660)
Backed out changeset b3518d5285be (bug 1508660)
Backed out changeset 94a957b9ba90 (bug 1508660)
Backed out changeset 773938f18269 (bug 1508660)
Backed out changeset 4eca8fce0a47 (bug 1508660)
2018-12-17 17:15:23 +02:00
yulia
6c3024e401 Bug 1508660 - make storage front and changes front async; r=ochameau
Depends on D13110

Differential Revision: https://phabricator.services.mozilla.com/D13336
2018-12-17 12:29:52 +00:00
yulia
7e63058cf6 bug 1507146 - make changesView have an async init method; r=ochameau
ChangesView was challenging because the async call was in the constructor. I moved it out of the
constructor to the init method, and do a check to see if its been initialized in the destroy method.

Depends on D11886

Differential Revision: https://phabricator.services.mozilla.com/D11887
2018-11-21 14:39:17 +00:00
Razvan Caliman
1da467aa01 Bug 1502857 - Refactor loading tools in Inspector sidebar; r=gl
- removes duplication of logic to create each panel.
- removes needless exposing of panel instances as properties on `inspector`:
  - `inspector.layoutview`
  - `inspector.fontinspector`
  - `inspector.animationinspector`
  - `inspector.changesview`
- updates tests to not rely on those exposed properties and instead
call `inspector.getPanel(toolId)` (previously created panels are stored
and a reference is returned).
- consolidates panel `destroy()` so we don't have to remember to
destroy them individually.

MozReview-Commit-ID: GVkP6z7FxKt

Differential Revision: https://phabricator.services.mozilla.com/D10053
2018-11-06 10:42:52 +00:00
Razvan Caliman
7cffe4603b Bug 1499049 - (Part 9) Add tests for tracking changes to CSS declarations from the Rule view; r=pbro
Depends on D9659
Adds infrastructure and tests for validating that changes to CSS
declarations in the Inspector Rule view are tracked and show up in the
Changes panel.

Makes use of the `client/inspector/rules/test/head.js` file with helpers
to instrument changes in the Rule view then observe results on the
Changes panel.

This is a first pass on tests. More will follow to validate:
- declarations in at-rules;
- nested at-rules;
- declarations in various sources: inline styles, external stylesheets.

Differential Revision: https://phabricator.services.mozilla.com/D9660
2018-10-25 16:01:21 +00:00
Razvan Caliman
812c57c474 Bug 1499049 - (Part 8) Clear the changes store when about to navigate to a new page; r=pbro
Depends on D9257
We need to clear the store of previous changes but we should not remove
references and event listeners to the ChangesActor since the DevTools
session is still active.

MozReview-Commit-ID: Okp2CcSlfw

Differential Revision: https://phabricator.services.mozilla.com/D9659
2018-10-25 08:07:40 +00:00
Brad Werth
3922d40e76 Bug 1468754 Part 5: Make ChangesView respond to change events. r=rcaliman
Depends on D9176

Differential Revision: https://phabricator.services.mozilla.com/D9178
2018-10-22 19:18:15 +00:00
Dorel Luca
07b5accb27 Backed out 5 changesets (bug 1468754) for xpcshell and eslint failures. CLOSED TREE
Backed out changeset 67f969f5bdba (bug 1468754)
Backed out changeset 55ba74fa5c95 (bug 1468754)
Backed out changeset 0d44a0523525 (bug 1468754)
Backed out changeset da447a45603e (bug 1468754)
Backed out changeset 71f45c79522e (bug 1468754)
2018-10-22 22:00:49 +03:00
Brad Werth
006107982b Bug 1468754 Part 5: Make ChangesView respond to change events. r=rcaliman
Depends on D9176

Differential Revision: https://phabricator.services.mozilla.com/D9178
2018-10-22 18:01:41 +00:00
Gurzau Raul
052bb9147e Backed out 5 changesets (bug 1468754) for linting failure at checkouts/gecko/devtools/server/actors/utils/actor-registry.js on a CLOSED TREE
Backed out changeset c36e8383aa3a (bug 1468754)
Backed out changeset c98ac7503111 (bug 1468754)
Backed out changeset ddd043a258e0 (bug 1468754)
Backed out changeset e6ff3400a4f6 (bug 1468754)
Backed out changeset 817018fb5aa4 (bug 1468754)
2018-10-22 20:02:13 +03:00
Brad Werth
aad3885e20 Bug 1468754 Part 5: Make ChangesView respond to change events. r=rcaliman
Depends on D9176

Differential Revision: https://phabricator.services.mozilla.com/D9178
2018-10-22 16:31:42 +00:00
Razvan Caliman
133e830364 Bug 1478448 - (Part 3) Add Track Changes sidebar panel in Inspector. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D3328
2018-09-18 08:55:36 +00:00
Csoregi Natalia
925bccfda2 Backed out 5 changesets (bug 1478448) for devtools failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset 1ece57c66cc8 (bug 1478448)
Backed out changeset 8ecc1050fdfc (bug 1478448)
Backed out changeset 775ad6690aa8 (bug 1478448)
Backed out changeset cc33bc63f405 (bug 1478448)
Backed out changeset 57b2bb7a6565 (bug 1478448)
2018-09-17 19:22:38 +03:00
Razvan Caliman
cabf331b9e Bug 1478448 - (Part 3) Add Track Changes sidebar panel in Inspector. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D3328
2018-09-17 09:17:07 +00:00