Skip to content

Commit eb1b624

Browse files
committed
Merge branch 'main' into select-all-iconbutton
2 parents 7e9b267 + 790adc3 commit eb1b624

19 files changed

+2042
-5461
lines changed

l10n/bundle.l10n.de.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"Stop dev server": "Entwicklungsserver stoppen",
2525
"this feature": "diese Funktion",
2626
"Toggle Playwright Configs": "Playwright-Konfigurationen umschalten",
27-
"Update snapshots:": "Snapshots aktualisieren:",
28-
"Update method:" : "Methode aktualisieren:",
27+
"Update snapshots": "Snapshots aktualisieren",
28+
"Update method" : "Methode aktualisieren:",
2929
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "Wenn aktiviert, wird Playwright die Browserinstanz zwischen den Tests wiederverwenden. Dies deaktiviert die parallele Ausführung.",
3030
"SETTINGS": "EINSTELLUNGEN",
3131
"PROJECTS": "PROJEKTE",

l10n/bundle.l10n.fr.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"Stop dev server": "Arrêter le serveur de développement",
2525
"this feature": "cette fonctionnalité",
2626
"Toggle Playwright Configs": "Basculer les configurations Playwright",
27-
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "Si cette option est activée, Playwright réutilisera l'instance du navigateur entre les tests. Cela désactivera l'exécution parallèle.",
27+
"Update snapshots": "Mettre à jour les captures",
28+
"Update method" : "Mettre à jour la méthode",
2829
"Select All": "Tout sélectionner",
2930
"Unselect All": "Tout désélectionner",
30-
"Update snapshots:": "Mettre à jour les captures:",
31-
"Update method:" : "Mettre à jour la méthode:"
31+
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "Si cette option est activée, Playwright réutilisera l'instance du navigateur entre les tests. Cela désactivera l'exécution parallèle."
3232
}

l10n/bundle.l10n.it.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"Stop dev server": "Ferma dev server",
2525
"this feature": "questo feature",
2626
"Toggle Playwright Configs": "Attiva/disattiva Playwright Configs",
27-
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "Quando attivata, Playwright riusa l'instanza browser tra i test. Questo disattiva l'esecuzione parallela.",
27+
"Update snapshots": "Aggiorna snapshots",
28+
"Update method" : "Aggiorna metodo",
2829
"Select All": "Seleziona tutto",
2930
"Unselect All": "Deseleziona tutto",
30-
"Update snapshots:": "Aggiorna snapshots:",
31-
"Update method:" : "Aggiorna metodo:"
31+
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "Quando attivata, Playwright riusa l'instanza browser tra i test. Questo disattiva l'esecuzione parallela."
3232
}

l10n/bundle.l10n.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"Stop dev server": "Stop dev server",
2525
"this feature": "this feature",
2626
"Toggle Playwright Configs": "Toggle Playwright Configs",
27-
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.",
27+
"Update snapshots": "Update snapshots",
28+
"Update method" : "Update method",
2829
"Select All": "Select All",
2930
"Unselect All": "Unselect All",
30-
"Update snapshots:": "Update snapshots:",
31-
"Update method:" : "Update method:"
31+
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution."
3232
}

l10n/bundle.l10n.zh-CN.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"Stop dev server": "停止 dev 服务器",
2525
"this feature": "该功能",
2626
"Toggle Playwright Configs": "切换 Playwright 配置",
27-
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "启用后,Playwright 将在测试之间重复使用浏览器实例。这将禁用并行执行。",
27+
"Update snapshots": "更新快照",
28+
"Update method" : "更新方法",
2829
"Select All": "全选",
2930
"Unselect All": "取消全选",
30-
"Update snapshots:": "更新快照:",
31-
"Update method:" : "更新方法:"
31+
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "启用后,Playwright 将在测试之间重复使用浏览器实例。这将禁用并行执行。"
3232
}

media/common.css

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
body {
18+
margin: 0;
19+
padding: 0;
20+
user-select: none;
21+
line-height: 22px;
22+
}
23+
24+
body[data-vscode-theme-kind=vscode-dark] div.separator {
25+
border-color: rgba(204, 204, 204, 0.2);
26+
}
27+
28+
.hbox {
29+
display: flex;
30+
flex: auto;
31+
position: relative;
32+
}
33+
34+
.vbox {
35+
display: flex;
36+
flex-direction: column;
37+
flex: auto;
38+
position: relative;
39+
}
40+
41+
svg {
42+
transform: scale(0.3);
43+
fill: var(--vscode-editor-foreground);
44+
margin: -18px;
45+
width: 56px;
46+
pointer-events: none;
47+
}
48+
49+
input, textarea {
50+
background-color: var(--vscode-input-background);
51+
color: var(--vscode-input-foreground);
52+
border-width: 1px;
53+
border-style: solid;
54+
border-color: var(--vscode-input-border, transparent);
55+
border-radius: 2px;
56+
padding: 2px 6px;
57+
}
58+
59+
input {
60+
font-family: system-ui, Ubuntu, "Droid Sans", sans-serif, "Droid Sans Mono", "monospace", monospace;
61+
font-size: 13px;
62+
line-height: 20px;
63+
letter-spacing: 0px;
64+
}
65+
66+
.combobox {
67+
margin: 0 8px;
68+
}
69+
70+
input:focus, textarea:focus {
71+
opacity: 1;
72+
outline-color: var(--vscode-focusBorder);
73+
outline-offset: -1px;
74+
outline-style: solid;
75+
outline-width: 1px;
76+
}
77+
78+
textarea {
79+
font-size: 12px;
80+
}
81+
82+
.section-header {
83+
font-size: 11px;
84+
margin: 10px 8px 3px 8px;
85+
font-weight: 700;
86+
color: var(--vscode-editor-inlineValuesForeground);
87+
88+
display: flex;
89+
justify-content: space-between;
90+
align-items: baseline;
91+
}
92+
93+
.section-toolbar > a {
94+
border-radius: 5px;
95+
font-size: 16px;
96+
}
97+
98+
.section-toolbar > a:hover {
99+
background-color: var(--vscode-toolbar-hoverBackground);
100+
}
101+
102+
.action, .combobox {
103+
padding: 0 4px;
104+
cursor: pointer;
105+
display: flex;
106+
}
107+
108+
.action[disabled] {
109+
opacity: 0.5;
110+
cursor: default;
111+
background-color: none !important;
112+
}
113+
114+
input[type=checkbox] {
115+
padding: 0 4px;
116+
cursor: pointer;
117+
}
118+
119+
select {
120+
background: transparent;
121+
color: inherit;
122+
outline: none !important;
123+
border: none !important;
124+
height: 22px;
125+
padding: 2px 0;
126+
cursor: pointer;
127+
background: var(--vscode-sideBar-background);
128+
}
129+
130+
label {
131+
display: flex;
132+
align-items: center;
133+
cursor: inherit;
134+
flex: auto;
135+
}
136+
137+
.action:hover, .combobox:hover {
138+
background-color: #e8e8e8;
139+
}
140+
141+
body[data-vscode-theme-kind=vscode-dark] .action:hover,
142+
body[data-vscode-theme-kind=vscode-dark] .combobox:hover {
143+
background-color: #2a2d2e;
144+
}
145+
146+
/* Settings view */
147+
148+
.settings-view .action-indent {
149+
flex: none;
150+
width: 4px;
151+
}
152+
153+
.settings-view.action-big-indent {
154+
flex: none;
155+
width: 20px;
156+
}
157+
158+
.settings-view select.models {
159+
padding: 2px 0;
160+
width: 100%;
161+
}
162+
163+
/* Locators view */
164+
165+
.locators-view .section {
166+
margin: 0 10px 10px;
167+
display: flex;
168+
flex-direction: column;
169+
}
170+
171+
.locators-view .section > label {
172+
margin-bottom: 5px;
173+
}
174+
175+
.locators-view p.error {
176+
color: var(--vscode-errorForeground);
177+
}
178+
179+
.locators-view #actions {
180+
flex: none;
181+
display: flex;
182+
padding: 2px;
183+
}
184+
185+
.locators-view .action {
186+
padding: 0;
187+
}
188+
189+
.locators-view #locator {
190+
flex: auto;
191+
}

media/common.js

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// @ts-check
18+
19+
// @ts-ignore
20+
const vscode = acquireVsCodeApi();
21+
22+
/**
23+
@typedef {{
24+
configFile: string,
25+
}} Config
26+
27+
@typedef {{
28+
name: string,
29+
enabled: boolean
30+
}} ProjectEntry
31+
32+
@typedef {{
33+
command: string,
34+
text: string,
35+
svg: string,
36+
title?: string,
37+
location?: string,
38+
hidden?: boolean,
39+
disabled?: boolean
40+
}} ActionDescriptor
41+
*/
42+
43+
/**
44+
* @param {ActionDescriptor} action
45+
* @param {{ omitText?: boolean }=} options
46+
* @returns {HTMLElement|null}
47+
*/
48+
function createAction(action, options) {
49+
const actionElement = document.createElement('div');
50+
actionElement.classList.add('action');
51+
if (action.hidden)
52+
return null;
53+
if (action.disabled)
54+
actionElement.setAttribute('disabled', 'true');
55+
const label = document.createElement('label');
56+
if (!action.disabled) {
57+
label.addEventListener('click', () => {
58+
vscode.postMessage({ method: 'execute', params: { command: label.getAttribute('command') } });
59+
});
60+
}
61+
label.setAttribute('role', 'button');
62+
label.setAttribute('command', action.command);
63+
const svg = /** @type {HTMLElement} */(document.createElement('svg'));
64+
label.appendChild(svg);
65+
svg.outerHTML = action.svg;
66+
if (!options?.omitText && action.text)
67+
label.appendChild(document.createTextNode(action.text));
68+
label.title = action.title || action.text;
69+
actionElement.appendChild(label);
70+
return actionElement;
71+
}
72+
73+
globalThis.createAction = createAction;

media/locatorsView.css

-29
This file was deleted.

0 commit comments

Comments
 (0)