Commit Graph
26 Commits
Author SHA1 Message Date
Razvan Caliman ce9a43e4b8 Bug 1541824 - Make Copy All Changes button sticky in Changes panel. r=gl
Ensure the button to copy all changes remains in view even when the Changes panel is overflowing vertically.

Differential Revision: https://phabricator.services.mozilla.com/D28487
2019-04-24 07:58:50 +00:00
Razvan Caliman 662ffbacd3 Bug 1543045 - Break strings for long CSS property names and values. r=gl
Introduce `overflow-wrap: break-word` to CSS declarations in Rules view and Changes panel to prevent long strings from causing unwanted horizontal scroll

Differential Revision: https://phabricator.services.mozilla.com/D27120
2019-04-12 08:58:09 +00:00
Florens Verschelde b9599cc9ef Bug 1543348 - Create generic button background variables; r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D26880
2019-04-11 16:23:47 +00:00
Razvan Caliman e5ca0fcd88 Bug 1532511 - Update colors for buttons in Changes panel; r=pbro
Reflecting latest UI changes: https://mozilla.invisionapp.com/share/VFQC7MQSD9W#/screens

Differential Revision: https://phabricator.services.mozilla.com/D22099
2019-03-05 15:28:47 +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 5433e18797 Bug 1530662 - Add hover/active and dark theme colors for buttons in Changes panel. r=pbro
Adds button styles to conform to latest UI designs:
https://mozilla.invisionapp.com/share/VFQC7MQSD9W#/screens

Differential Revision: https://phabricator.services.mozilla.com/D21212
2019-02-26 14:18:29 +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 f7ce8a8ade Bug 1527924 - (Part 2) Show selector diffs in the Changes panel. r=pbro
Depends on D19828

Updates the React component of the Changes panel to show the diff of
a rule's selector if it has changed.

The previous implementation assumed that a selector rename meant a whole
rule removal (with the old selector) followed by a whole rule addition
(with the new selector).

This new implementation tracks the changes to the selector atomically.
The main benefit is that if the selector is renamed, the diff in the
Changes panel shows only this action and not the unchanged declarations.

The test was re-enabled and adjusted to account for this difference in behaviour.

This refactor was required in order to be compatible with Bug 1525238
which lays the ground work for matching rules from the client with rules
from the server. This is necessary in order to have consistent behaviour
for export options, like Copy Rule, which need to match the rule on the
server even if its selector was changed.

Differential Revision: https://phabricator.services.mozilla.com/D19830
2019-02-18 13:14:29 +00:00
Razvan Caliman 7a1d6c266d Bug 1518512 - (Part 2) Ensure all text in Changes panel can be copied. r=gl
Depends on D17255
Replaces CSS pseudo-elements for added/removed line markers with text
elements that can be copied with the rest of the content.

Differential Revision: https://phabricator.services.mozilla.com/D17256
2019-01-25 15:50:35 +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 f31f98fccf Bug 1518512 - (Part 2) Ensure all text in Changes panel can be copied. r=gl
Depends on D17255
Replaces CSS pseudo-elements for added/removed line markers with text
elements that can be copied with the rest of the content.

Differential Revision: https://phabricator.services.mozilla.com/D17256
2019-01-25 12:40:34 +00:00
Razvan Caliman 12eafb3427 Bug 1506455 - Enforce LTR code on RTL layout in Changes panel r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D13617
2018-12-03 09:17:38 +00:00
Razvan Caliman 0ad7a495c6 Bug 1508338 - Add dark theme colors to Changes panel; r=gl
Differential Revision: https://phabricator.services.mozilla.com/D12770
2018-11-28 21:58:22 +00:00
Razvan Caliman 5d8e8e0263 Bug 1503924 - Mark style sources from iframes in the Changes panel. r=gl
Depends on D12590

Differential Revision: https://phabricator.services.mozilla.com/D12697
2018-11-26 05:02:06 +00:00
Razvan Caliman 6038b6bd61 Bug 1503924 - Move level definition to CSS variable in DOM and reuse in Changes panel stylesheet. r=gl
Depends on D12588

Support indefinite nesting by declaring the --diff-level CSS custom property as an inline style on the element at its level of nesting.
This custom property will be used in the stylesheet to compute the appropriate padding-left to create the indentation necessary.

A minumum offset is used, --diff-level-min-offset, to account for the first level (zero-indexed) and to allow additional padding on added/removed lines to clear  the +/- icons.

Differential Revision: https://phabricator.services.mozilla.com/D12590
2018-11-22 19:12:27 +00:00
Razvan Caliman 15791ed77b Bug 1503924 - Trim source URLs to filename in Changes panel. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D12588
2018-11-23 16:25:18 +00:00
Razvan Caliman 85151f26f1 Bug 1503595 - Add empty state for Changes panel; r=gl
Design spec: https://mozilla.invisionapp.com/share/6MLNVPYGR97#/screens

- add localization file
- add strings to show when no CSS changes are available to show
- conditionally show empty state message or diff of changes in React component

MozReview-Commit-ID: 8xYJmg0yGAM

Differential Revision: https://phabricator.services.mozilla.com/D11468
2018-11-15 12:18:45 +00:00
Razvan Caliman 7aed14aa9a 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. 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.

Differential Revision: https://phabricator.services.mozilla.com/D11116
2018-11-07 10:00:31 +00:00
Razvan Caliman 0c0e1a765b Bug 1499049 - (Part 5) Refactor Changes panel to render diff of nested CSS rule structures; r=pbro
Depends on D8721

- Externalize reusable CSSDeclaration React component;
- Introduce the ability to render rules with unlimited levels of nesting, but cap indentation in the UI at a reasonable level;
- Remove accordion behavior from rules, but keep for sources;
- Cleanup CSS styles for Changes panel.

Differential Revision: https://phabricator.services.mozilla.com/D8722
2018-10-25 13:42:05 +00:00
Razvan Caliman fdb21173e0 Bug 1478448 - (Part 4) Render tracked style changes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D3329
2018-09-18 08:56:08 +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 0f1bcbcc30 Bug 1478448 - (Part 4) Render tracked style changes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D3329
2018-09-17 15:06:29 +00:00