From f7a86554a147a101726bcbd42f33aeef85ffd93f Mon Sep 17 00:00:00 2001 From: Hubert Boma Manilla Date: Thu, 4 May 2023 00:23:44 +0000 Subject: [PATCH] Bug 1824701 - [devtools] Change the styling for blackboxing r=devtools-reviewers,nchevobbe 1) This patch cleanups the styling for blackboxing - Ignored sources in the source tree are colored out and the icoon colors are consistent. - Source content for ignored sources are also colored out. - Ignored lines are colored out. - The tab content for ignored sources are also abit lighter. 2) Also added tests to assert the lines in the sources are styled correcty Thanks Differential Revision: https://phabricator.services.mozilla.com/D173688 --- .../debugger/src/components/Editor/Footer.css | 2 +- .../debugger/src/components/Editor/Tab.js | 1 + .../debugger/src/components/Editor/Tabs.css | 2 +- .../src/components/PrimaryPanes/Sources.css | 6 +- .../PrimaryPanes/SourcesTreeItem.js | 5 +- .../test/mochitest/browser_dbg-blackbox.js | 164 ++++++++++++++++-- devtools/client/themes/dark-theme.css | 6 +- devtools/client/themes/light-theme.css | 6 +- 8 files changed, 165 insertions(+), 27 deletions(-) diff --git a/devtools/client/debugger/src/components/Editor/Footer.css b/devtools/client/debugger/src/components/Editor/Footer.css index 701c7d0a50e7..aee6c51d3849 100644 --- a/devtools/client/debugger/src/components/Editor/Footer.css +++ b/devtools/client/debugger/src/components/Editor/Footer.css @@ -60,7 +60,7 @@ } .source-footer .blackboxed .img.blackBox { - background-color: var(--red-40); + background-color: #806414; } .source-footer .commands button.prettyPrint:disabled { diff --git a/devtools/client/debugger/src/components/Editor/Tab.js b/devtools/client/debugger/src/components/Editor/Tab.js index b675b6164e70..71b73265e0ff 100644 --- a/devtools/client/debugger/src/components/Editor/Tab.js +++ b/devtools/client/debugger/src/components/Editor/Tab.js @@ -206,6 +206,7 @@ class Tab extends PureComponent { const className = classnames("source-tab", { active, pretty: isPrettyCode, + blackboxed: this.props.isBlackBoxed, }); const path = getDisplayPath(source, tabSources); diff --git a/devtools/client/debugger/src/components/Editor/Tabs.css b/devtools/client/debugger/src/components/Editor/Tabs.css index 6c1e378d7ece..565d8588f1b5 100644 --- a/devtools/client/debugger/src/components/Editor/Tabs.css +++ b/devtools/client/debugger/src/components/Editor/Tabs.css @@ -84,7 +84,7 @@ } .source-tab .img.source-icon.blackBox { - background-color: var(--red-40); + background-color: #806414; } .source-tab .filename { diff --git a/devtools/client/debugger/src/components/PrimaryPanes/Sources.css b/devtools/client/debugger/src/components/PrimaryPanes/Sources.css index 9d2ae6f295a9..f9849de39628 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/Sources.css +++ b/devtools/client/debugger/src/components/PrimaryPanes/Sources.css @@ -123,9 +123,13 @@ background-color: var(--theme-tab-toolbar-background); } +.sources-list .tree .blackboxed { + color: #806414; +} + .sources-list .img.blackBox { mask-size: 13px; - background-color: var(--red-40); + background-color: #806414; } .sources-list .tree .label { diff --git a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js index 37d5089dde88..017f03a3870b 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js @@ -382,7 +382,10 @@ class SourceTreeItem extends Component { return (