Bug 1530341 - (Part 1) Remove Copy Changes and Copy All Changes context menu options. r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Mon, 25 Feb 2019 22:34:31 +0000
changeset 518877 d744e4b8444357f5507c22ced0da7e6dac2fe441
parent 518876 f0fb6764fdb7cd0bae97e21db7eb1cdab9cd9f9f
child 518878 ea28e78057d5a0492582727564e2220322a690a6
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1530341
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530341 - (Part 1) Remove Copy Changes and Copy All Changes context menu options. r=gl Remove the Copy All and Copy All Changes context menu options form the Changes panel context menu. As decided by PM & UX, they will be replaced with a single Copy All Changes button in the toolbar (part 2 of this series). Differential Revision: https://phabricator.services.mozilla.com/D21007
devtools/client/inspector/changes/ChangesContextMenu.js
devtools/client/locales/en-US/changes.properties
--- a/devtools/client/inspector/changes/ChangesContextMenu.js
+++ b/devtools/client/inspector/changes/ChangesContextMenu.js
@@ -23,17 +23,16 @@ class ChangesContextMenu {
     this.inspector = this.view.inspector;
     // Document object to which the Changes panel belongs to.
     this.document = this.view.document;
     // DOM element container for the Changes panel content.
     this.panel = this.document.getElementById("sidebar-panel-changes");
     // Window object to which the Changes panel belongs to.
     this.window = this.document.defaultView;
 
-    this._onCopyChanges = this.view.copyChanges.bind(this.view);
     this._onCopyRule = this.view.copyRule.bind(this.view);
     this._onCopySelection = this.view.copySelection.bind(this.view);
     this._onSelectAll = this._onSelectAll.bind(this);
   }
 
   show(event) {
     this._openMenu({
       target: event.target,
@@ -53,51 +52,29 @@ class ChangesContextMenu {
       accesskey: getStr("changes.contextmenu.copy.accessKey"),
       click: this._onCopySelection,
       disabled: !this._hasTextSelected(),
     });
     menu.append(menuitemCopy);
 
     const ruleEl = target.closest("[data-rule-id]");
     const ruleId = ruleEl ? ruleEl.dataset.ruleId : null;
-    const sourceEl = target.closest("[data-source-id]");
-    const sourceId = sourceEl ? sourceEl.dataset.sourceId : null;
 
-    // When both rule id and source id are found, deal with just for that rule.
-    if (ruleId && sourceId) {
-      // Copy Changes option
-      menu.append(new MenuItem({
-        label: getStr("changes.contextmenu.copyChanges"),
-        click: () => this._onCopyChanges(ruleId, sourceId),
-      }));
-
+    if (ruleId) {
       // Copy Rule option
       menu.append(new MenuItem({
         label: getStr("changes.contextmenu.copyRule"),
         click: () => this._onCopyRule(ruleId),
       }));
 
       menu.append(new MenuItem({
         type: "separator",
       }));
     }
 
-    // When only the source id is found, deal with all changed rules in that source.
-    if (!ruleId && sourceId) {
-      // Copy All Changes option
-      menu.append(new MenuItem({
-        label: getStr("changes.contextmenu.copyAllChanges"),
-        click: () => this._onCopyChanges(null, sourceId),
-      }));
-
-      menu.append(new MenuItem({
-        type: "separator",
-      }));
-    }
-
     // Select All option
     const menuitemSelectAll = new MenuItem({
       label: getStr("changes.contextmenu.selectAll"),
       accesskey: getStr("changes.contextmenu.selectAll.accessKey"),
       click: this._onSelectAll,
     });
     menu.append(menuitemSelectAll);
 
--- a/devtools/client/locales/en-US/changes.properties
+++ b/devtools/client/locales/en-US/changes.properties
@@ -28,20 +28,16 @@ changes.iframeLabel=iframe
 # LOCALIZATION NOTE (changes.contextmenu.copy): Label for "Copy" option in Changes panel
 # context menu
 changes.contextmenu.copy=Copy
 
 # LOCALIZATION NOTE (changes.contextmenu.copy.accessKey): Access key for "Copy"
 # option in the Changes panel.
 changes.contextmenu.copy.accessKey=C
 
-# LOCALIZATION NOTE (changes.contextmenu.copyChanges): Label for "Copy Changes" option in
-# Changes panel context menu which copies only the subset of changed CSS declarations.
-changes.contextmenu.copyChanges=Copy Changes
-
 # LOCALIZATION NOTE (changes.contextmenu.copyAllChanges): Label for "Copy All Changes"
 # option in Changes panel context menu which copies all changed CSS declarations from a
 # stylesheet
 changes.contextmenu.copyAllChanges=Copy All Changes
 
 # LOCALIZATION NOTE (changes.contextmenu.copyRule): Label for "Copy Rule" option in
 # Changes panel context menu which copies the complete contents of a CSS rule.
 changes.contextmenu.copyRule=Copy Rule