Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 5395ed5

Browse files
committed
Bug 1630989 - Rename the params panel to request r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D71763
1 parent 96edbb0 commit 5395ed5

17 files changed

+87
-83
lines changed

devtools/client/locales/en-US/netmonitor.properties

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,23 @@ cookiesFilterText=Filter Cookies
8888
responseEmptyText=No response data available for this request
8989

9090
# LOCALIZATION NOTE (paramsEmptyText): This is the text displayed in the
91-
# params tab of the network details pane when there are no params available.
91+
# request tab of the network details pane when there are no params available.
9292
paramsEmptyText=No parameters for this request
9393

9494
# LOCALIZATION NOTE (paramsFilterText): This is the text displayed in the
95-
# params tab of the network details pane for the filtering input.
95+
# request tab of the network details pane for the filtering input.
9696
paramsFilterText=Filter Request Parameters
9797

9898
# LOCALIZATION NOTE (paramsQueryString): This is the label displayed
99-
# in the network details params tab identifying the query string.
99+
# in the network details request tab identifying the query string.
100100
paramsQueryString=Query String
101101

102102
# LOCALIZATION NOTE (paramsFormData): This is the label displayed
103-
# in the network details params tab identifying the form data.
103+
# in the network details request tab identifying the form data.
104104
paramsFormData=Form data
105105

106106
# LOCALIZATION NOTE (paramsPostPayload): This is the label displayed
107-
# in the network details params tab identifying the request payload.
107+
# in the network details request tab identifying the request payload.
108108
paramsPostPayload=Request payload
109109

110110
# LOCALIZATION NOTE (requestHeaders): This is the label displayed
@@ -121,11 +121,11 @@ requestHeadersFromUpload=Request headers from upload stream
121121
responseHeaders=Response Headers
122122

123123
# LOCALIZATION NOTE (requestCookies): This is the label displayed
124-
# in the network details params tab identifying the request cookies.
124+
# in the network details request tab identifying the request cookies.
125125
requestCookies=Request Cookies
126126

127127
# LOCALIZATION NOTE (responseCookies): This is the label displayed
128-
# in the network details params tab identifying the response cookies.
128+
# in the network details request tab identifying the response cookies.
129129
responseCookies=Response Cookies
130130

131131
# LOCALIZATION NOTE (responsePayload): This is the label displayed
@@ -150,7 +150,7 @@ jsonpScopeName=JSONP → callback %S()
150150
responseTruncated=Response has been truncated
151151

152152
# LOCALIZATION NOTE (requestTruncated): This is the text displayed
153-
# in the params tab of the network details pane when the request is over
153+
# in the request tab of the network details pane when the request is over
154154
# the truncation limit and thus was truncated.
155155
requestTruncated=Request has been truncated
156156

@@ -841,6 +841,10 @@ netmonitor.tab.cache=Cache
841841
# in the network details pane identifying the params tab.
842842
netmonitor.tab.params=Params
843843

844+
# LOCALIZATION NOTE (netmonitor.tab.request): This is the label displayed
845+
# in the network details pane identifying the request tab.
846+
netmonitor.tab.request=Request
847+
844848
# LOCALIZATION NOTE (netmonitor.tab.response): This is the label displayed
845849
# in the network details pane identifying the response tab.
846850
netmonitor.tab.response=Response

devtools/client/netmonitor/src/components/TabboxPanel.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const HeadersPanel = createFactory(
2929
const WebSocketsPanel = createFactory(
3030
require("devtools/client/netmonitor/src/components/websockets/WebSocketsPanel")
3131
);
32-
const ParamsPanel = createFactory(
33-
require("devtools/client/netmonitor/src/components/request-details/ParamsPanel")
32+
const RequestPanel = createFactory(
33+
require("devtools/client/netmonitor/src/components/request-details/RequestPanel")
3434
);
3535
const CachePanel = createFactory(
3636
require("devtools/client/netmonitor/src/components/request-details/CachePanel")
@@ -53,7 +53,7 @@ const CACHE_TITLE = L10N.getStr("netmonitor.tab.cache");
5353
const COOKIES_TITLE = L10N.getStr("netmonitor.tab.cookies");
5454
const HEADERS_TITLE = L10N.getStr("netmonitor.tab.headers");
5555
const MESSAGES_TITLE = L10N.getStr("netmonitor.tab.messages");
56-
const PARAMS_TITLE = L10N.getStr("netmonitor.tab.params");
56+
const REQUEST_TITLE = L10N.getStr("netmonitor.tab.request");
5757
const RESPONSE_TITLE = L10N.getStr("netmonitor.tab.response");
5858
const SECURITY_TITLE = L10N.getStr("netmonitor.tab.security");
5959
const STACK_TRACE_TITLE = L10N.getStr("netmonitor.tab.stackTrace");
@@ -179,11 +179,11 @@ class TabboxPanel extends Component {
179179
),
180180
TabPanel(
181181
{
182-
id: PANELS.PARAMS,
183-
title: PARAMS_TITLE,
182+
id: PANELS.REQUEST,
183+
title: REQUEST_TITLE,
184184
className: "panel-with-code",
185185
},
186-
ParamsPanel({
186+
RequestPanel({
187187
connector,
188188
openLink,
189189
request,

devtools/client/netmonitor/src/components/request-details/ParamsPanel.js renamed to devtools/client/netmonitor/src/components/request-details/RequestPanel.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ loader.lazyGetter(this, "SourcePreview", function() {
5252
const { div } = dom;
5353

5454
const JSON_SCOPE_NAME = L10N.getStr("jsonScopeName");
55-
const PARAMS_EMPTY_TEXT = L10N.getStr("paramsEmptyText");
56-
const PARAMS_FILTER_TEXT = L10N.getStr("paramsFilterText");
57-
const PARAMS_FORM_DATA = L10N.getStr("paramsFormData");
58-
const PARAMS_POST_PAYLOAD = L10N.getStr("paramsPostPayload");
59-
const PARAMS_QUERY_STRING = L10N.getStr("paramsQueryString");
55+
const REQUEST_EMPTY_TEXT = L10N.getStr("paramsEmptyText");
56+
const REQUEST_FILTER_TEXT = L10N.getStr("paramsFilterText");
57+
const REQUEST_FORM_DATA = L10N.getStr("paramsFormData");
58+
const REQUEST_POST_PAYLOAD = L10N.getStr("paramsPostPayload");
59+
const REQUEST_QUERY_STRING = L10N.getStr("paramsQueryString");
6060
const REQUEST_TRUNCATED = L10N.getStr("requestTruncated");
6161

6262
/**
6363
* Params panel component
6464
* Displays the GET parameters and POST data of a request
6565
*/
66-
class ParamsPanel extends Component {
66+
class RequestPanel extends Component {
6767
static get propTypes() {
6868
return {
6969
connector: PropTypes.object.isRequired,
@@ -160,7 +160,7 @@ class ParamsPanel extends Component {
160160
!postData &&
161161
!query
162162
) {
163-
return div({ className: "empty-notice" }, PARAMS_EMPTY_TEXT);
163+
return div({ className: "empty-notice" }, REQUEST_EMPTY_TEXT);
164164
}
165165

166166
let error;
@@ -175,8 +175,8 @@ class ParamsPanel extends Component {
175175
filterText,
176176
targetSearchResult,
177177
},
178-
header: PARAMS_QUERY_STRING,
179-
id: "paramsQueryString",
178+
header: REQUEST_QUERY_STRING,
179+
id: "requestQueryString",
180180
opened: true,
181181
});
182182
}
@@ -192,8 +192,8 @@ class ParamsPanel extends Component {
192192
targetSearchResult,
193193
defaultSelectFirstNode: false,
194194
},
195-
header: PARAMS_FORM_DATA,
196-
id: "paramsFormData",
195+
header: REQUEST_FORM_DATA,
196+
id: "requestFormData",
197197
opened: true,
198198
});
199199
}
@@ -238,8 +238,8 @@ class ParamsPanel extends Component {
238238
mode: mimeType.replace(/;.+/, ""),
239239
targetSearchResult,
240240
},
241-
header: PARAMS_POST_PAYLOAD,
242-
id: "paramsPostPayload",
241+
header: REQUEST_POST_PAYLOAD,
242+
id: "requestPostPayload",
243243
opened: true,
244244
});
245245
}
@@ -253,7 +253,7 @@ class ParamsPanel extends Component {
253253
delay: FILTER_SEARCH_DELAY,
254254
type: "filter",
255255
onChange: text => this.setState({ filterText: text }),
256-
placeholder: PARAMS_FILTER_TEXT,
256+
placeholder: REQUEST_FILTER_TEXT,
257257
})
258258
),
259259
Accordion({ items })
@@ -264,4 +264,4 @@ class ParamsPanel extends Component {
264264
module.exports = connect(null, dispatch => ({
265265
updateRequest: (id, data, batch) =>
266266
dispatch(Actions.updateRequest(id, data, batch)),
267-
}))(ParamsPanel);
267+
}))(RequestPanel);

devtools/client/netmonitor/src/components/request-details/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ DevToolsModules(
77
'CookiesPanel.js',
88
'HeadersPanel.js',
99
'NetworkDetailsBar.js',
10-
'ParamsPanel.js',
1110
'PropertiesView.js',
11+
'RequestPanel.js',
1212
'ResponsePanel.js',
1313
'SecurityPanel.js',
1414
'StackTracePanel.js',

devtools/client/netmonitor/src/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const PANELS = {
222222
COOKIES: "cookies",
223223
HEADERS: "headers",
224224
MESSAGES: "messages",
225-
PARAMS: "params",
225+
REQUEST: "request",
226226
RESPONSE: "response",
227227
CACHE: "cache",
228228
SECURITY: "security",

devtools/client/netmonitor/src/widgets/RequestListContextMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class RequestListContextMenu {
470470
async copyPostData(id, formDataSections, requestPostData) {
471471
let params = [];
472472
// Try to extract any form data parameters if formDataSections is already
473-
// available, which is only true if ParamsPanel has ever been mounted before.
473+
// available, which is only true if RequestPanel has ever been mounted before.
474474
if (formDataSections) {
475475
formDataSections.forEach(section => {
476476
const paramsArray = parseQueryString(section);

devtools/client/netmonitor/src/workers/search/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function searchInResource(resource, query, modifiers) {
100100
findMatches(resource, query, modifiers, {
101101
key: "requestPostData.postData.text",
102102
type: "requestPostData",
103-
panel: "params",
103+
panel: "request",
104104
})
105105
);
106106
}

devtools/client/netmonitor/test/browser_net_complex-params.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ add_task(async function() {
2323
// Execute requests.
2424
await performRequests(monitor, tab, 12);
2525

26-
let wait = waitForDOM(document, "#params-panel .accordion-item", 3);
26+
let wait = waitForDOM(document, "#request-panel .accordion-item", 3);
2727
EventUtils.sendMouseEvent(
2828
{ type: "mousedown" },
2929
document.querySelectorAll(".request-list-item")[0]
3030
);
3131
EventUtils.sendMouseEvent(
3232
{ type: "click" },
33-
document.querySelector("#params-tab")
33+
document.querySelector("#request-tab")
3434
);
3535
await wait;
3636
testParamsTab1("a", "", '{ "foo": "bar" }', "");
3737

38-
wait = waitForDOM(document, "#params-panel .accordion-item", 3);
38+
wait = waitForDOM(document, "#request-panel .accordion-item", 3);
3939
EventUtils.sendMouseEvent(
4040
{ type: "mousedown" },
4141
document.querySelectorAll(".request-list-item")[1]
4242
);
4343
await wait;
4444
testParamsTab1("a", "b", '{ "foo": "bar" }', "");
4545

46-
wait = waitForDOM(document, "#params-panel .accordion-item", 3);
46+
wait = waitForDOM(document, "#request-panel .accordion-item", 3);
4747
EventUtils.sendMouseEvent(
4848
{ type: "mousedown" },
4949
document.querySelectorAll(".request-list-item")[2]
@@ -52,17 +52,17 @@ add_task(async function() {
5252
testParamsTab1("a", "b", "?foo", "bar");
5353

5454
let waitRows, waitSourceEditor;
55-
waitRows = waitForDOM(document, "#params-panel tr.treeRow", 2);
56-
waitSourceEditor = waitForDOM(document, "#params-panel .CodeMirror-code");
55+
waitRows = waitForDOM(document, "#request-panel tr.treeRow", 2);
56+
waitSourceEditor = waitForDOM(document, "#request-panel .CodeMirror-code");
5757
EventUtils.sendMouseEvent(
5858
{ type: "mousedown" },
5959
document.querySelectorAll(".request-list-item")[3]
6060
);
6161
await Promise.all([waitRows, waitSourceEditor]);
6262
testParamsTab2("a", "", '{ "foo": "bar" }', "js");
6363

64-
waitRows = waitForDOM(document, "#params-panel tr.treeRow", 2);
65-
waitSourceEditor = waitForDOM(document, "#params-panel .CodeMirror-code");
64+
waitRows = waitForDOM(document, "#request-panel tr.treeRow", 2);
65+
waitSourceEditor = waitForDOM(document, "#request-panel .CodeMirror-code");
6666
EventUtils.sendMouseEvent(
6767
{ type: "mousedown" },
6868
document.querySelectorAll(".request-list-item")[4]
@@ -73,10 +73,10 @@ add_task(async function() {
7373
// Wait for all accordion items and editor updated by react
7474
const waitAccordionItems = waitForDOM(
7575
document,
76-
"#params-panel .accordion-item",
76+
"#request-panel .accordion-item",
7777
2
7878
);
79-
waitSourceEditor = waitForDOM(document, "#params-panel .CodeMirror-code");
79+
waitSourceEditor = waitForDOM(document, "#request-panel .CodeMirror-code");
8080
EventUtils.sendMouseEvent(
8181
{ type: "mousedown" },
8282
document.querySelectorAll(".request-list-item")[5]
@@ -90,23 +90,23 @@ add_task(async function() {
9090
);
9191
testParamsTab3();
9292

93-
wait = waitForDOM(document, "#params-panel .accordion-item", 3);
93+
wait = waitForDOM(document, "#request-panel .accordion-item", 3);
9494
EventUtils.sendMouseEvent(
9595
{ type: "mousedown" },
9696
document.querySelectorAll(".request-list-item")[7]
9797
);
9898
await wait;
9999
testParamsTab1("a", "b", '{ "foo": "bar" }', "");
100100

101-
wait = waitForDOM(document, "#params-panel .accordion-item", 3);
101+
wait = waitForDOM(document, "#request-panel .accordion-item", 3);
102102
EventUtils.sendMouseEvent(
103103
{ type: "mousedown" },
104104
document.querySelectorAll(".request-list-item")[8]
105105
);
106106
await wait;
107107
testParamsTab1("a", "b", '{ "foo": "bar" }', "");
108108

109-
wait = waitForDOM(document, "#params-panel .accordion-item", 1);
109+
wait = waitForDOM(document, "#request-panel .accordion-item", 1);
110110
EventUtils.sendMouseEvent(
111111
{ type: "mousedown" },
112112
document.querySelectorAll(".request-list-item")[9]
@@ -115,15 +115,15 @@ add_task(async function() {
115115
testParamsTabGetWithArgs(new Map([["species", "in=(52,60)"]]));
116116

117117
// Only the tree content will change
118-
wait = waitForDOM(document, "#params-panel tr.treeTable", 0);
118+
wait = waitForDOM(document, "#request-panel tr.treeTable", 0);
119119
EventUtils.sendMouseEvent(
120120
{ type: "mousedown" },
121121
document.querySelectorAll(".request-list-item")[10]
122122
);
123123
await wait;
124124
testParamsTabGetWithArgs(new Map([["a", ["", "b"]]]));
125125

126-
wait = waitForDOM(document, "#params-panel tr.treeTable", 0);
126+
wait = waitForDOM(document, "#request-panel tr.treeTable", 0);
127127
EventUtils.sendMouseEvent(
128128
{ type: "mousedown" },
129129
document.querySelectorAll(".request-list-item")[11]
@@ -144,7 +144,7 @@ add_task(async function() {
144144
formDataParamName,
145145
formDataParamValue
146146
) {
147-
const tabpanel = document.querySelector("#params-panel");
147+
const tabpanel = document.querySelector("#request-panel");
148148

149149
is(
150150
tabpanel.querySelectorAll(".accordion-item").length,
@@ -178,7 +178,7 @@ add_task(async function() {
178178
is(
179179
accordionItems[0].querySelector(".accordion-header-label").textContent,
180180
L10N.getStr("paramsQueryString"),
181-
"The params section doesn't have the correct title."
181+
"The request query section doesn't have the correct title."
182182
);
183183
is(
184184
accordionItems[1].querySelector(".accordion-header-label").textContent,
@@ -216,7 +216,7 @@ add_task(async function() {
216216
editorMode
217217
) {
218218
const isJSON = editorMode === "js";
219-
const tabpanel = document.querySelector("#params-panel");
219+
const tabpanel = document.querySelector("#request-panel");
220220

221221
is(
222222
tabpanel.querySelectorAll(".accordion-item").length,
@@ -304,7 +304,7 @@ add_task(async function() {
304304
}
305305

306306
function testParamsTab3() {
307-
const tabpanel = document.querySelector("#params-panel");
307+
const tabpanel = document.querySelector("#request-panel");
308308

309309
is(
310310
tabpanel.querySelectorAll(".accordion-item").length,
@@ -338,7 +338,7 @@ add_task(async function() {
338338
* values
339339
*/
340340
function testParamsTabGetWithArgs(expectedParams) {
341-
const tabpanel = document.querySelector("#params-panel");
341+
const tabpanel = document.querySelector("#request-panel");
342342

343343
let numParamRows = 0;
344344
expectedParams.forEach((v, k, m) => {
@@ -376,7 +376,7 @@ add_task(async function() {
376376
is(
377377
accordionItems[0].querySelector(".accordion-header-label").textContent,
378378
L10N.getStr("paramsQueryString"),
379-
"Check the displayed params section title."
379+
"Check the displayed request query section title."
380380
);
381381

382382
const labelsIter = labels.values();

devtools/client/netmonitor/test/browser_net_decode-params.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ add_task(async function() {
3131

3232
EventUtils.sendMouseEvent(
3333
{ type: "click" },
34-
document.querySelector("#params-tab")
34+
document.querySelector("#request-tab")
3535
);
3636

3737
// The Params panel should render the following:

0 commit comments

Comments
 (0)