Skip to content

Commit

Permalink
chore: select projects in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Mar 14, 2024
1 parent 6054a7b commit 3a781f4
Show file tree
Hide file tree
Showing 29 changed files with 1,045 additions and 569 deletions.
2 changes: 2 additions & 0 deletions l10n/bundle.l10n.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Record at cursor": "Enregistrer au niveau du curseur",
"Reveal test output": "Afficher les résultats des tests",
"Close all browsers": "Fermer tous les navigateurs",
"Select Playwright Config": "Sélectionner la configuration Playwright",
"Toggle Playwright Configs": "Basculer les configurations Playwright",
"Accept to copy locator into clipboard": "Accepter pour copier le locator dans le presse-papiers",
"Can't record while running tests": "Impossible d'enregistrer pendant l'exécution des tests",
"this feature": "cette fonctionnalité",
Expand Down
2 changes: 2 additions & 0 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Record at cursor": "Record at cursor",
"Reveal test output": "Reveal test output",
"Close all browsers": "Close all browsers",
"Select Playwright Config": "Select Playwright Config",
"Toggle Playwright Configs": "Toggle Playwright Configs",
"Accept to copy locator into clipboard": "Accept to copy locator into clipboard",
"Can't record while running tests": "Can't record while running tests",
"this feature": "this feature",
Expand Down
2 changes: 2 additions & 0 deletions l10n/bundle.l10n.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Record at cursor": "在当前光标处开始录制",
"Reveal test output": "显示测试输出",
"Close all browsers": "关闭全部 Playwright 浏览器",
"Select Playwright Config": "选择 Playwright 配置",
"Toggle Playwright Configs": "切换 Playwright 配置",
"Accept to copy locator into clipboard": "确认保存到剪贴板",
"Can't record while running tests": "运行测试时不能录制",
"this feature": "该功能",
Expand Down
20 changes: 17 additions & 3 deletions media/settingsView.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ svg {
fill: var(--vscode-editor-foreground);
margin: -18px;
width: 56px;
pointer-events: none;
}

.list {
Expand All @@ -34,7 +35,7 @@ svg {
.list > div {
height: 22px;
line-height: 22px;
padding-right: 12px;
padding-right: 2px;
padding-left: 8px;
display: flex;
align-items: center;
Expand All @@ -56,11 +57,24 @@ input[type=checkbox] {
cursor: pointer;
}

.list > div:hover {
select {
background: transparent;
color: inherit;
outline: none !important;
border: none !important;
padding: 2px 0 2px;
width: 100%;
cursor: pointer;
background: var(--vscode-sideBar-background);
}

.list > div:hover,
select:hover {
background-color: #e8e8e8;
}

body[data-vscode-theme-kind=vscode-dark] .list > div:hover {
body[data-vscode-theme-kind=vscode-dark] .list > div:hover,
body[data-vscode-theme-kind=vscode-dark] select:hover {
background-color: #2a2d2e;
}

Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"command": "pw.extension.command.recordAtCursor",
"title": "%contributes.command.pw.extension.command.recordAtCursor%"
},
{
"category": "Test",
"icon": "$(gear)",
"command": "pw.extension.command.toggleModels",
"title": "%contributes.command.pw.extension.command.toggleModels%"
},
{
"category": "Test",
"command": "pw.extension.toggle.reuseBrowser",
Expand Down Expand Up @@ -91,6 +97,10 @@
"playwright.allowWatchingFiles": {
"type": "boolean",
"default": false
},
"playwright.workspaceSettings": {
"type": "object",
"default": {}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions package.nls.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"contributes.command.pw.extension.command.closeBrowsers": "Fermer tous les navigateurs",
"contributes.command.pw.extension.command.recordNew": "Enregistrer nouveau",
"contributes.command.pw.extension.command.recordAtCursor": "Enregistrer au niveau du curseur",
"contributes.command.pw.extension.command.toggleModels": "Sélectionner les configurations Playwright",
"contributes.command.pw.extension.toggle.reuseBrowser": "Activer/désactiver la réutilisation du navigateur",
"contributes.command.pw.extension.toggle.showTrace": "Activer/désactiver Playwright Trace Viewer",
"configuration.playwright.env": "Variables d'environnement à transmettre à Playwright Test.",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"contributes.command.pw.extension.command.closeBrowsers": "Close all Playwright browsers",
"contributes.command.pw.extension.command.recordNew": "Record new",
"contributes.command.pw.extension.command.recordAtCursor": "Record at cursor",
"contributes.command.pw.extension.command.selectPlaywrightConfig": "Select Playwright Config",
"contributes.command.pw.extension.command.toggleModels": "Toggle Playwright Configs",
"contributes.command.pw.extension.toggle.reuseBrowser": "Toggle Playwright Browser Reuse",
"contributes.command.pw.extension.toggle.showTrace": "Toggle Playwright Trace Viewer",
"configuration.playwright.env": "Environment variables to pass to Playwright Test.",
Expand Down
1 change: 1 addition & 0 deletions package.nls.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"contributes.command.pw.extension.command.closeBrowsers": "关闭全部 Playwright 浏览器",
"contributes.command.pw.extension.command.recordNew": "录制新用例",
"contributes.command.pw.extension.command.recordAtCursor": "在当前光标处开始录制",
"contributes.command.pw.extension.command.toggleModels": "选择 Playwright 配置",
"contributes.command.pw.extension.toggle.reuseBrowser": "是否复用 Playwright 浏览器",
"configuration.playwright.env": "Playwright Test 运行环境变量",
"configuration.playwright.reuseBrowser": "在测试用例间显示并复用 Playwright 浏览器",
Expand Down
27 changes: 27 additions & 0 deletions src/disposableBase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as vscodeTypes from './vscodeTypes';

export class DisposableBase implements vscodeTypes.Disposable {
protected _disposables: vscodeTypes.Disposable[] = [];

dispose() {
for (const d of this._disposables)
d.dispose();
this._disposables = [];
}
}
Loading

0 comments on commit 3a781f4

Please sign in to comment.