Skip to content

Commit 7a4fb31

Browse files
authored
Make configuration wizard sticky (#925)
## Changes Add `ignoreFocusOut` to both steps of the configuration wizard. They will not disappear when focusing away from them, but can still be closed with an escape button. ## Tests Manual
1 parent 0ec1d8d commit 7a4fb31

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/databricks-vscode/src/configuration/configureWorkspaceWizard.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export async function configureWorkspaceWizard(
7575
return false;
7676
},
7777
items,
78+
ignoreFocusOut: true,
7879
});
7980

8081
state.host = normalizeHost(host);
@@ -158,6 +159,7 @@ export async function configureWorkspaceWizard(
158159
totalSteps: 2,
159160
placeholder: "Select authentication method",
160161
items,
162+
ignoreFocusOut: true,
161163
shouldResume: async () => {
162164
return false;
163165
},

packages/databricks-vscode/src/ui/wizard.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ interface QuickAutoCompleteParameters {
4343
buttons?: QuickInputButton[];
4444
shouldResume: () => Thenable<boolean>;
4545
items: Array<QuickPickItem>;
46+
ignoreFocusOut: boolean;
4647
}
4748

4849
interface QuickPickParameters<T extends QuickPickItem> {
@@ -54,6 +55,7 @@ interface QuickPickParameters<T extends QuickPickItem> {
5455
placeholder: string;
5556
buttons?: QuickInputButton[];
5657
shouldResume: () => Thenable<boolean>;
58+
ignoreFocusOut: boolean;
5759
}
5860

5961
export class MultiStepInput {
@@ -107,6 +109,7 @@ export class MultiStepInput {
107109
buttons,
108110
shouldResume,
109111
items,
112+
ignoreFocusOut,
110113
}: QuickAutoCompleteParameters): Promise<
111114
| string
112115
| (QuickAutoCompleteParameters extends {buttons: (infer I)[]}
@@ -129,6 +132,7 @@ export class MultiStepInput {
129132
input.totalSteps = totalSteps;
130133
input.placeholder = prompt;
131134
input.items = [...items];
135+
input.ignoreFocusOut = ignoreFocusOut;
132136

133137
disposables.push(
134138
input.onDidChangeValue(async () => {
@@ -231,6 +235,7 @@ export class MultiStepInput {
231235
placeholder,
232236
buttons,
233237
shouldResume,
238+
ignoreFocusOut,
234239
}: P) {
235240
const disposables: Disposable[] = [];
236241
try {
@@ -243,6 +248,7 @@ export class MultiStepInput {
243248
input.totalSteps = totalSteps;
244249
input.placeholder = placeholder;
245250
input.items = items;
251+
input.ignoreFocusOut = ignoreFocusOut;
246252
if (activeItem) {
247253
input.activeItems = [activeItem];
248254
}

0 commit comments

Comments
 (0)