Rename class and variable names for Ignore List Settings Tab

This patch replaces unwelcoming language with better terms.

Bug: 1152082
Design doc: http://doc/1UnwKLgjYPDsLsYCBh9LKiaPN6Aq2XLKvt4Ak3FT7J3k
rename vars and css classes

Change-Id: I2a48888eccff83bf7b49bfa3da08e4ca9e368da6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2587023
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
This commit is contained in:
Wolfgang Beyer
2020-12-16 10:29:08 +00:00
committed by Commit Bot
parent 08a5d41a75
commit 59ea4edef7
2 changed files with 36 additions and 36 deletions
@@ -85,21 +85,21 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox {
UI.ARIAUtils.markAsHeading(header, 1);
this.contentElement.createChild('div', 'intro').textContent = i18nString(UIStrings.debuggerWillSkipThroughThe);
const blackboxContentScripts = this.contentElement.createChild('div', 'blackbox-content-scripts');
blackboxContentScripts.appendChild(UI.SettingsUI.createSettingCheckbox(
const ignoreListContentScripts = this.contentElement.createChild('div', 'ignore-list-content-scripts');
ignoreListContentScripts.appendChild(UI.SettingsUI.createSettingCheckbox(
i18nString(UIStrings.ignoreListContentScripts),
Common.Settings.Settings.instance().moduleSetting('skipContentScripts'), true));
UI.Tooltip.Tooltip.install(blackboxContentScripts, i18nString(UIStrings.ignoreListContentScriptsExtension));
UI.Tooltip.Tooltip.install(ignoreListContentScripts, i18nString(UIStrings.ignoreListContentScriptsExtension));
this._blackboxLabel = i18nString(UIStrings.ignoreList);
this._ignoreListLabel = i18nString(UIStrings.ignoreList);
this._disabledLabel = i18nString(UIStrings.disabled);
this._list = new UI.ListWidget.ListWidget(this);
this._list.element.classList.add('blackbox-list');
this._list.element.classList.add('ignore-list');
this._list.registerRequiredCSS('settings/frameworkIgnoreListSettingsTab.css', {enableLegacyPatching: true});
const placeholder = document.createElement('div');
placeholder.classList.add('blackbox-list-empty');
placeholder.classList.add('ignore-list-empty');
placeholder.textContent = i18nString(UIStrings.noIgnoreListPatterns);
this._list.setEmptyPlaceholder(placeholder);
this._list.show(this.contentElement);
@@ -144,15 +144,15 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox {
*/
renderItem(item, editable) {
const element = document.createElement('div');
element.classList.add('blackbox-list-item');
const pattern = element.createChild('div', 'blackbox-pattern');
element.classList.add('ignore-list-item');
const pattern = element.createChild('div', 'ignore-list-pattern');
pattern.textContent = item.pattern;
UI.Tooltip.Tooltip.install(pattern, i18nString(UIStrings.ignoreScriptsWhoseNamesMatchS, {PH1: item.pattern}));
element.createChild('div', 'blackbox-separator');
element.createChild('div', 'blackbox-behavior').textContent =
item.disabled ? this._disabledLabel : this._blackboxLabel;
element.createChild('div', 'ignore-list-separator');
element.createChild('div', 'ignore-list-behavior').textContent =
item.disabled ? this._disabledLabel : this._ignoreListLabel;
if (item.disabled) {
element.classList.add('blackbox-disabled');
element.classList.add('ignore-list-disabled');
}
return element;
}
@@ -193,7 +193,7 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox {
beginEdit(item) {
const editor = this._createEditor();
editor.control('pattern').value = item.pattern;
editor.control('behavior').value = item.disabled ? this._disabledLabel : this._blackboxLabel;
editor.control('behavior').value = item.disabled ? this._disabledLabel : this._ignoreListLabel;
return editor;
}
@@ -209,19 +209,19 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox {
this._editor = editor;
const content = editor.contentElement();
const titles = content.createChild('div', 'blackbox-edit-row');
titles.createChild('div', 'blackbox-pattern').textContent = i18nString(UIStrings.pattern);
titles.createChild('div', 'blackbox-separator blackbox-separator-invisible');
titles.createChild('div', 'blackbox-behavior').textContent = i18nString(UIStrings.behavior);
const titles = content.createChild('div', 'ignore-list-edit-row');
titles.createChild('div', 'ignore-list-pattern').textContent = i18nString(UIStrings.pattern);
titles.createChild('div', 'ignore-list-separator ignore-list-separator-invisible');
titles.createChild('div', 'ignore-list-behavior').textContent = i18nString(UIStrings.behavior);
const fields = content.createChild('div', 'blackbox-edit-row');
const fields = content.createChild('div', 'ignore-list-edit-row');
const pattern = editor.createInput('pattern', 'text', '/framework\\.js$', patternValidator.bind(this));
UI.ARIAUtils.setAccessibleName(pattern, i18nString(UIStrings.pattern));
fields.createChild('div', 'blackbox-pattern').appendChild(pattern);
fields.createChild('div', 'blackbox-separator blackbox-separator-invisible');
const behavior = editor.createSelect('behavior', [this._blackboxLabel, this._disabledLabel], behaviorValidator);
fields.createChild('div', 'ignore-list-pattern').appendChild(pattern);
fields.createChild('div', 'ignore-list-separator ignore-list-separator-invisible');
const behavior = editor.createSelect('behavior', [this._ignoreListLabel, this._disabledLabel], behaviorValidator);
UI.ARIAUtils.setAccessibleName(behavior, i18nString(UIStrings.behavior));
fields.createChild('div', 'blackbox-behavior').appendChild(behavior);
fields.createChild('div', 'ignore-list-behavior').appendChild(behavior);
return editor;
@@ -20,7 +20,7 @@
margin-top: 10px;
}
.blackbox-content-scripts {
.ignore-list-content-scripts {
margin-top: 10px;
flex: none;
}
@@ -31,14 +31,14 @@
flex: none;
}
.blackbox-list {
.ignore-list {
margin-top: 10px;
max-width: 500px;
flex: 0 1 auto;
min-height: 30px;
}
.blackbox-list-empty {
.ignore-list-empty {
flex: auto;
height: 30px;
display: flex;
@@ -46,7 +46,7 @@
justify-content: center;
}
.blackbox-list-item {
.ignore-list-item {
padding: 3px 5px 3px 5px;
height: 30px;
display: flex;
@@ -55,12 +55,12 @@
flex: auto 1 1;
}
.blackbox-pattern {
.ignore-list-pattern {
flex: auto;
min-width: 100px;
}
.blackbox-list-item .blackbox-pattern {
.ignore-list-item .ignore-list-pattern {
white-space: nowrap;
text-overflow: ellipsis;
user-select: none;
@@ -68,32 +68,32 @@
overflow: hidden;
}
.blackbox-list-item.blackbox-disabled .blackbox-pattern {
.ignore-list-item.ignore-list-disabled .ignore-list-pattern {
text-decoration: line-through;
}
.blackbox-behavior {
.ignore-list-behavior {
flex: 0 0 100px;
padding-left: 10px;
}
.blackbox-behavior > select {
.ignore-list-behavior > select {
margin-left: -10px;
}
.blackbox-separator {
.ignore-list-separator {
flex: 0 0 1px;
background-color: rgb(231 231 231);
height: 30px;
margin: 0 4px;
}
.blackbox-separator-invisible {
.ignore-list-separator-invisible {
visibility: hidden;
height: 100% !important;
}
.blackbox-edit-row {
.ignore-list-edit-row {
flex: none;
display: flex;
flex-direction: row;
@@ -101,8 +101,8 @@
align-items: center;
}
.blackbox-edit-row input,
.blackbox-edit-row select {
.ignore-list-edit-row input,
.ignore-list-edit-row select {
width: 100%;
text-align: inherit;
}