Open joyceerhl opened 1 year ago
@TylerLeonhardt it looks like the quick input doesn't support overriding the label of the "OK" button. Am I reading that correctly? I know about the custom button for quick input, but I can't use it in this case because the simple file picker already uses it for something else.
You're correct. You only get:
We could have the ability to override "OK" to something else... but that might make the button look to wide. I almost feel like the placeholder
in the input or the title
is a better case for this openLabel
as it is basically the prompt.
What do you think?
The simple file dialog fills the input box with the path, so placeholder
won't work. The The extension can set the title
is always set to "Open File", but we can use the open label if it's set.title
, and the openLabel
specifcially has this documentation:
Fair enough. Yeah I think it's a fair ask to be able configure the OK
button's text. Honestly we really should have like:
primaryButton
(aka ok
) - this fires the onDidAccept
eventsecondaryButton
(aka custom
) - this fires the onDidCustom
(which could be renamed to onDidSecondary
)or maybe any number of buttons... but that could be more cumbersome as one would need to be marked primary so to ensure something fires onDidAccept
vscode.window.showOpenDialog({ openLabel: 'some message' })
in a remote window or with"files.simpleDialog.enable": true
openLabel
isn't rendered anywhere