[cleanup] Consistently use 'Open in Foo panel'.

Instead of the longer 'Reveal in Foo panel', just use 'Open in Foo
panel', which also aligns well with the wording that is otherwise
used (e.g. 'Open in new tab').

Bug: 372873222
Change-Id: Icbd93f5c6bbe8ea011179cbcedb8c306536ed781
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5979752
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Müller <petermueller@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
This commit is contained in:
Benedikt Meurer
2024-10-31 09:48:18 +00:00
committed by Devtools-frontend LUCI CQ
parent 22ff0d8dde
commit 61a8b2d0a0
13 changed files with 33 additions and 32 deletions
@@ -45,7 +45,7 @@ describe('LinearMemoryInspector', () => {
assert.equal(stoppedText, 'Paused on breakpoint');
const localVariable = await waitFor('[data-object-property-name-for-test="d"]');
const memIcon = await waitFor('[title="Reveal in Memory inspector panel"]', localVariable);
const memIcon = await waitFor('[title="Open in Memory inspector panel"]', localVariable);
await clickElement(memIcon);
const byteHighlights = await waitForMany('.byte-cell.highlight-area', 8);
@@ -23,7 +23,7 @@ const UIStrings = {
/**
*@description Title for a link to the Elements panel
*/
clickToRevealInElementsPanel: 'Click to reveal in Elements panel',
clickToOpenInElementsPanel: 'Click to open in Elements panel',
/**
*@description Name of a network resource type
*/
@@ -120,8 +120,7 @@ async function maybeCreateLinkToElementsPanel(opener: Protocol.Page.FrameId|SDK.
return null;
}
const linkElement = linkifyIcon(
'code-circle', i18nString(UIStrings.clickToRevealInElementsPanel),
() => Common.Revealer.reveal(linkTargetDOMNode));
'code-circle', i18nString(UIStrings.clickToOpenInElementsPanel), () => Common.Revealer.reveal(linkTargetDOMNode));
const label = document.createElement('span');
label.textContent = `<${linkTargetDOMNode.nodeName().toLocaleLowerCase()}>`;
linkElement.insertBefore(label, linkElement.firstChild);
@@ -61,11 +61,11 @@ const UIStrings = {
/**
*@description Title for a link to the Sources panel
*/
clickToRevealInSourcesPanel: 'Click to reveal in Sources panel',
clickToOpenInSourcesPanel: 'Click to open in Sources panel',
/**
*@description Title for a link to the Network panel
*/
clickToRevealInNetworkPanel: 'Click to reveal in Network panel',
clickToOpenInNetworkPanel: 'Click to open in Network panel',
/**
*@description Title for unreachable URL field
*/
@@ -73,7 +73,7 @@ const UIStrings = {
/**
*@description Title for a link that applies a filter to the network panel
*/
clickToRevealInNetworkPanelMight: 'Click to reveal in Network panel (might require page reload)',
clickToOpenInNetworkPanelMight: 'Click to open in Network panel (might require page reload)',
/**
*@description The origin of a URL (https://web.dev/same-site-same-origin/#origin)
*(for a lot of languages this does not need to be translated, please translate only where necessary)
@@ -87,7 +87,7 @@ const UIStrings = {
/**
*@description Title for a link to the Elements panel
*/
clickToRevealInElementsPanel: 'Click to reveal in Elements panel',
clickToOpenInElementsPanel: 'Click to open in Elements panel',
/**
*@description Title for ad frame type field
*/
@@ -391,7 +391,7 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
const sourceCode = this.#uiSourceCodeForFrame(this.#frame);
return renderIconLink(
'breakpoint-circle',
i18nString(UIStrings.clickToRevealInSourcesPanel),
i18nString(UIStrings.clickToOpenInSourcesPanel),
() => Common.Revealer.reveal(sourceCode),
'reveal-in-sources',
);
@@ -402,7 +402,7 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
const resource = this.#frame.resourceForURL(this.#frame.url);
if (resource && resource.request) {
const request = resource.request;
return renderIconLink('arrow-up-down-circle', i18nString(UIStrings.clickToRevealInNetworkPanel), () => {
return renderIconLink('arrow-up-down-circle', i18nString(UIStrings.clickToOpenInNetworkPanel), () => {
const requestLocation = NetworkForward.UIRequestLocation.UIRequestLocation.tab(
request, NetworkForward.UIRequestLocation.UIRequestTabs.HEADERS_COMPONENT);
return Common.Revealer.reveal(requestLocation);
@@ -446,7 +446,7 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
if (unreachableUrl) {
return renderIconLink(
'arrow-up-down-circle',
i18nString(UIStrings.clickToRevealInNetworkPanelMight),
i18nString(UIStrings.clickToOpenInNetworkPanelMight),
():
void => {
void Common.Revealer.reveal(NetworkForward.UIFilter.UIRequestFilter.filters([
@@ -489,7 +489,7 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
<devtools-report-key>${i18nString(UIStrings.ownerElement)}</devtools-report-key>
<devtools-report-value class="without-min-width">
<div class="inline-items">
<button class="link text-link" role="link" tabindex=0 title=${i18nString(UIStrings.clickToRevealInElementsPanel)}
<button class="link text-link" role="link" tabindex=0 title=${i18nString(UIStrings.clickToOpenInElementsPanel)}
@mouseenter=${() => this.#frame?.highlight()}
@mouseleave=${() => SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight()}
@click=${() => Common.Revealer.reveal(linkTargetDOMNode)}
@@ -36,11 +36,11 @@ const UIStrings = {
/**
*@description button: Title of button to reveal the corresponding request of rule set in Elements panel
*/
buttonClickToRevealInElementsPanel: 'Click to reveal in Elements panel',
clickToOpenInElementsPanel: 'Click to open in Elements panel',
/**
*@description button: Title of button to reveal the corresponding request of rule set in Network panel
*/
buttonClickToRevealInNetworkPanel: 'Click to reveal in Network panel',
clickToOpenInNetworkPanel: 'Click to open in Network panel',
/**
*@description Value of status, specifying rule set contains how many errors.
*/
@@ -170,7 +170,7 @@ function ruleSetRenderer(
return html`
<button class="link" role="link"
@click=${revealSpeculationRulesInElements}
title=${i18nString(UIStrings.buttonClickToRevealInElementsPanel)}
title=${i18nString(UIStrings.clickToOpenInElementsPanel)}
style=${LitHtml.Directives.styleMap({
border: 'none',
background: 'none',
@@ -197,7 +197,7 @@ function ruleSetRenderer(
${location}
</button>
`;
// clang-format on
// clang-format on
}
function ruleSetRendererOutOfDocument(ruleSet: Protocol.Preload.RuleSet, location: string): LitHtml.TemplateResult {
@@ -225,7 +225,7 @@ function ruleSetRenderer(
return html`
<button class="link" role="link"
@click=${revealSpeculationRulesInNetwork}
title=${i18nString(UIStrings.buttonClickToRevealInNetworkPanel)}
title=${i18nString(UIStrings.clickToOpenInNetworkPanel)}
style=${LitHtml.Directives.styleMap({
border: 'none',
background: 'none',
@@ -251,7 +251,7 @@ function ruleSetRenderer(
${location}
</button>
`;
// clang-format on
// clang-format on
}
const location = PreloadingString.ruleSetLocationShort(ruleSet, pageURL);
+2 -2
View File
@@ -110,7 +110,7 @@ const UIStrings = {
/**
* @description A context menu item to reveal a node in the DOM tree of the Elements Panel
*/
revealInElementsPanel: 'Reveal in Elements panel',
openInElementsPanel: 'Open in Elements panel',
/**
* @description Warning/error text displayed when a node cannot be found in the current page.
*/
@@ -1293,7 +1293,7 @@ export class ContextMenuProvider implements
return;
}
contextMenu.revealSection().appendItem(
i18nString(UIStrings.revealInElementsPanel), () => Common.Revealer.reveal(object),
i18nString(UIStrings.openInElementsPanel), () => Common.Revealer.reveal(object),
{jslogContext: 'elements.reveal-node'});
}
}
@@ -96,7 +96,7 @@ const UIStrings = {
/**
*@description Context menu item for style property in edit mode
*/
revealInSourcesPanel: 'Reveal in Sources panel',
openInSourcesPanel: 'Open in Sources panel',
/**
*@description A context menu item in Styles panel to copy CSS declaration
*/
@@ -1961,7 +1961,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
}
const revealCallback = this.navigateToSource.bind(this) as () => void;
contextMenu.defaultSection().appendItem(
i18nString(UIStrings.revealInSourcesPanel), revealCallback, {jslogContext: 'reveal-in-sources-panel'});
i18nString(UIStrings.openInSourcesPanel), revealCallback, {jslogContext: 'reveal-in-sources-panel'});
void contextMenu.show();
}
@@ -37,7 +37,7 @@ const UIStrings = {
/**
*@description A context menu item to reveal a node in the DOM tree of the Elements Panel
*/
revealInElementsPanel: 'Reveal in Elements panel',
openInElementsPanel: 'Open in Elements panel',
/**
*@description Text in Event Listeners Widget of the Elements panel
*/
@@ -340,7 +340,7 @@ export class ObjectEventListenerBar extends UI.TreeOutline.TreeElement {
}
if (object.subtype === 'node') {
menu.defaultSection().appendItem(
i18nString(UIStrings.revealInElementsPanel), () => Common.Revealer.reveal(object),
i18nString(UIStrings.openInElementsPanel), () => Common.Revealer.reveal(object),
{jslogContext: 'reveal-in-elements'});
}
menu.defaultSection().appendItem(
@@ -20,7 +20,7 @@ const UIStrings = {
/**
*@description A context menu item in the Scope View of the Sources Panel
*/
revealInMemoryInspectorPanel: 'Reveal in Memory inspector panel',
openInMemoryInspectorPanel: 'Open in Memory inspector panel',
};
const str_ =
i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorController.ts', UIStrings);
@@ -329,7 +329,7 @@ export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelO
const expression = target.path();
const object = target.property.value;
contextMenu.debugSection().appendItem(
i18nString(UIStrings.revealInMemoryInspectorPanel),
i18nString(UIStrings.openInMemoryInspectorPanel),
this.reveal.bind(this, new SDK.RemoteObject.LinearMemoryInspectable(object, expression)),
{jslogContext: 'reveal-in-memory-inspector'});
}
@@ -127,7 +127,7 @@ const UIStrings = {
* which are based on bytes and can be shown in a hexadecimal viewer.
* Clicking on the button will display that object in the Memory inspector panel.
*/
revealInMemoryInpector: 'Reveal in Memory inspector panel',
openInMemoryInpector: 'Open in Memory inspector panel',
};
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/ObjectPropertiesSection.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -391,7 +391,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
});
memoryIcon.setAttribute('jslog', `${VisualLogging.action('open-memory-inspector').track({click: true})}`);
const revealText = i18nString(UIStrings.revealInMemoryInpector);
const revealText = i18nString(UIStrings.openInMemoryInpector);
UI.Tooltip.Tooltip.install(memoryIcon, revealText);
UI.ARIAUtils.setLabel(memoryIcon, revealText);
+1 -1
View File
@@ -439,7 +439,7 @@ describe('The Console Tab', () => {
});
describe('for memory objects', () => {
const MEMORY_ICON_SELECTOR = '[aria-label="Reveal in Memory inspector panel"]';
const MEMORY_ICON_SELECTOR = '[aria-label="Open in Memory inspector panel"]';
it('shows one memory icon to open memory inspector for ArrayBuffers (description)', async () => {
const {frontend} = getBrowserAndPages();
+1 -1
View File
@@ -41,7 +41,7 @@ export async function navigateToServiceWorkers() {
export async function navigateToFrame(name: string) {
await doubleClickTreeItem(`[aria-label="${name}"]`);
await waitFor('[title="Click to reveal in Sources panel"]');
await waitFor('[title="Click to open in Sources panel"]');
await expectVeEvents([
veClick('Panel: resources > Pane: sidebar > Tree > TreeItem: frames > TreeItem: frame'),
veImpressionsUnder('Panel: resources', [veImpressionForFrameDetails()]),
+3 -1
View File
@@ -636,7 +636,9 @@ export async function openNestedWorkerFile(selectors: NestedFileSelector) {
export async function inspectMemory(variableName: string) {
await openSoftContextMenuAndClickOnItem(
`[data-object-property-name-for-test="${variableName}"]`, 'Reveal in Memory inspector panel');
`[data-object-property-name-for-test="${variableName}"]`,
'Open in Memory inspector panel',
);
}
export async function typeIntoSourcesAndSave(text: string) {
+1 -1
View File
@@ -39,7 +39,7 @@
<li>Reload the page</button></li>
<li>Breakpoint should hit the new breakpoint</button></li>
<li>Now look at the Scope in the DevTools and right click on the <code>imports.memory</code></li>
<li>Select "Reveal in Memory inspector panel"</li>
<li>Select "Open in Memory inspector panel"</li>
<li>The Linear memory inspector should open</li>
<li>Inspect memory and navigate</li>
</ol>