Skip to content

Input UI normalization #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/commands/addServerNamespaceToWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function pickNamespaceOnServer(serverName: string): Promise<string> {
}
// Get user's choice of namespace
const namespace = await vscode.window.showQuickPick(allNamespaces, {
placeHolder: `Namespace on server '${serverName}' (${connDisplayString})`,
title: `Pick a namespace on server '${serverName}' (${connDisplayString})`,
ignoreFocusOut: true,
});
return namespace;
Expand Down Expand Up @@ -133,7 +133,7 @@ export async function addServerNamespaceToWorkspace(resource?: vscode.Uri): Prom
detail: "Documents opened in this folder will be read-only.",
},
],
{ placeHolder: "Choose the type of access", ignoreFocusOut: true }
{ title: "Pick the type of access", ignoreFocusOut: true }
)
.then((mode) => mode?.value);
}
Expand Down Expand Up @@ -194,7 +194,7 @@ async function modifyWsFolderUri(uri: vscode.Uri): Promise<vscode.Uri | undefine
const filterType = await new Promise<string | undefined>((resolve) => {
let result: string;
const quickPick = vscode.window.createQuickPick();
quickPick.placeholder = "Choose what to show in the workspace folder";
quickPick.title = "Pick what to show in the workspace folder";
quickPick.ignoreFocusOut = true;
quickPick.items = [
{
Expand All @@ -203,11 +203,11 @@ async function modifyWsFolderUri(uri: vscode.Uri): Promise<vscode.Uri | undefine
},
{
label: "$(file-code) Web Application Files",
detail: "Choose a specific web application, or show all.",
detail: "Pick a specific web application, or show all.",
},
{
label: "$(files) Contents of a Server-side Project",
detail: "Choose an existing project, or create a new one.",
detail: "Pick an existing project, or create a new one.",
},
];
quickPick.activeItems = [project ? quickPick.items[2] : csp ? quickPick.items[1] : quickPick.items[0]];
Expand Down Expand Up @@ -263,7 +263,7 @@ async function modifyWsFolderUri(uri: vscode.Uri): Promise<vscode.Uri | undefine
let result: string;
const allItem: vscode.QuickPickItem = { label: "All" };
const quickPick = vscode.window.createQuickPick();
quickPick.placeholder = "Pick a specific web application to show, or show all";
quickPick.title = "Pick a specific web application to show, or show all";
quickPick.ignoreFocusOut = true;
quickPick.items = [
allItem,
Expand Down Expand Up @@ -331,7 +331,7 @@ async function modifyWsFolderUri(uri: vscode.Uri): Promise<vscode.Uri | undefine
const otherParams = await vscode.window.showQuickPick(items, {
ignoreFocusOut: true,
canPickMany: true,
placeHolder: "Add optional filters",
title: "Pick optional filters",
});
if (!otherParams) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/connectFolderToServerNamespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function connectFolderToServerNamespace(): Promise<void> {
const pick =
items.length === 1 && !items[0].detail
? items[0]
: await vscode.window.showQuickPick(items, { placeHolder: "Choose folder" });
: await vscode.window.showQuickPick(items, { title: "Pick a folder" });
const folder = allFolders.find((el) => el.name === pick.label);
// Get user's choice of server
const options: vscode.QuickPickOptions = {};
Expand Down Expand Up @@ -78,7 +78,7 @@ export async function connectFolderToServerNamespace(): Promise<void> {
}
// Get user's choice of namespace
const namespace = await vscode.window.showQuickPick(allNamespaces, {
placeHolder: `Namespace on server '${serverName}' (${connDisplayString})`,
title: `Pick a namespace on server '${serverName}' (${connDisplayString})`,
});
if (!namespace) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export async function exportAll(): Promise<any> {
.map((el) => el.name);
if (workspaceList.length > 1) {
const selection = await vscode.window.showQuickPick(workspaceList, {
placeHolder: "Select the workspace folder to export files to.",
title: "Pick the workspace folder to export files to.",
});
if (selection === undefined) {
return;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function pickProject(api: AtelierAPI): Promise<string | undefined>
if (projects.length === 0) {
const create = await vscode.window.showQuickPick(["Yes", "No"], {
ignoreFocusOut: true,
placeHolder: `Namespace ${ns} on server '${api.serverId}' contains no projects. Create one?`,
title: `Namespace ${ns} on server '${api.serverId}' contains no projects. Create one?`,
});
if (create == "Yes") {
return createProject(undefined, api);
Expand Down Expand Up @@ -839,7 +839,7 @@ export async function modifyProject(
{
ignoreFocusOut: true,
canPickMany: true,
placeHolder: `Select the items to remove from project '${project}'.`,
title: `Pick the items to remove from project '${project}'.`,
}
);
if (removeQPIs !== undefined) {
Expand Down Expand Up @@ -942,7 +942,7 @@ export async function exportProjectContents(node: ProjectNode | undefined): Prom
.map((el) => el.name);
if (workspaceList.length > 1) {
const selection = await vscode.window.showQuickPick(workspaceList, {
placeHolder: "Select the workspace folder to export files to.",
title: "Pick the workspace folder to export files to.",
});
if (selection === undefined) {
return;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/serverActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export async function serverActions(): Promise<void> {
}

const namespace = await vscode.window.showQuickPick(allNamespaces, {
placeHolder: `Choose the namespace to switch to`,
title: "Pick the namespace to switch to",
ignoreFocusOut: true,
});

Expand Down Expand Up @@ -215,7 +215,7 @@ export async function serverActions(): Promise<void> {
}
return vscode.window
.showQuickPick(actions, {
placeHolder: `Pick action to perform for server ${connInfo}`,
title: `Pick action to perform for server ${connInfo}`,
})
.then(connectionActionsHandler)
.then(async (action) => {
Expand Down Expand Up @@ -244,7 +244,7 @@ export async function serverActions(): Promise<void> {
});
if (addins != undefined) {
const addin = await vscode.window.showQuickPick(addins, {
placeHolder: `Pick a Studio Add-In to open for server: ${connInfo}`,
title: `Pick a Studio Add-In to open for server: ${connInfo}`,
});
if (addin) {
const token = await getCSPToken(api, addin.id);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class StudioActions {
}
return vscode.window.showQuickPick<StudioAction>(menuItems, {
canPickMany: false,
placeHolder: `Pick a server-side ${noun} to execute${suffix}`,
title: `Pick a server-side ${noun} to execute${suffix}`,
});
})
.then((action) => this.userAction(action));
Expand Down
2 changes: 1 addition & 1 deletion src/commands/subclass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function subclass(): Promise<void> {
vscode.window
.showQuickPick(
list.map((el) => el.Name),
{ placeHolder: "Pick a subclass" }
{ title: "Pick a subclass" }
)
.then((item) => {
open(item);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/superclass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function superclass(): Promise<void> {
if (!list.length) {
return;
}
vscode.window.showQuickPick(list, { placeHolder: "Pick a superclass" }).then((item) => {
vscode.window.showQuickPick(list, { title: "Pick a superclass" }).then((item) => {
open(item);
});
})
Expand Down
2 changes: 1 addition & 1 deletion src/commands/unitTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ async function runHandler(
matchOnDetail: true,
ignoreFocusOut: true,
title: `Cannot ${action} tests from multiple roots at once`,
placeHolder: `Please select a root to ${action} tests from`,
placeHolder: `Pick a root to ${action} tests from`,
}
);
if (picked) {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/xmlToUdl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export async function extractXMLFileContents(xmlUri?: vscode.Uri): Promise<void>
}),
{
ignoreFocusOut: true,
placeHolder: "Pick the workspace folder to run the command in",
title: "Pick the workspace folder to run the command in",
}
)
)?.wf;
Expand Down Expand Up @@ -170,7 +170,7 @@ export async function extractXMLFileContents(xmlUri?: vscode.Uri): Promise<void>
{
canPickMany: true,
ignoreFocusOut: true,
title: "Select the documents to extract",
title: "Pick the documents to extract",
placeHolder: "Files are created using your 'objectscript.export' settings",
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/explorer/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class ObjectScriptExplorerProvider implements vscode.TreeDataProvider<Nod
.then((data) => data.map((ns) => ({ label: ns })))
.then((data) =>
vscode.window.showQuickPick(data, {
placeHolder: `Choose a namespace on ${api.config.host}:${api.config.port} to add to the Explorer`,
title: `Pick a namespace on ${api.config.host}:${api.config.port} to add to the Explorer`,
})
)
.then((ns) => this.showExtra4Workspace(workspaceFolder, ns.label))
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ export async function checkConnection(
vscode.window
.showInputBox({
password: true,
placeHolder: `Not Authorized. Enter password to connect as user '${username}' to ${connInfo}`,
title: `Not Authorized. Enter password to connect as user '${username}' to ${connInfo}`,
prompt: !api.externalServer ? "If no password is entered the connection will be disabled." : "",
ignoreFocusOut: true,
})
Expand Down Expand Up @@ -1052,7 +1052,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
}
return vscode.window
.showInputBox({
placeHolder: "Please enter comma delimited arguments list",
title: "Enter comma delimited arguments list",
})
.then((args) => {
if (args != undefined && args != null) {
Expand Down Expand Up @@ -1122,7 +1122,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
}
return vscode.window
.showQuickPick<vscode.QuickPickItem>(list, {
placeHolder: `Pick the process to attach to in ${api.ns} on '${api.serverId}'`,
title: `Pick the process to attach to in ${api.ns} on '${api.serverId}'`,
matchOnDescription: true,
})
.then((value) => {
Expand Down