Skip to content
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

Proposed API for showing buttons inline after the input box #221397

Open
TylerLeonhardt opened this issue Jul 10, 2024 · 6 comments
Open

Proposed API for showing buttons inline after the input box #221397

TylerLeonhardt opened this issue Jul 10, 2024 · 6 comments
Assignees
Labels
api-finalization feature-request Request for new features or functionality on-testplan quick-pick Quick-pick widget issues
Milestone

Comments

@TylerLeonhardt
Copy link
Member

Here's the proposal:

declare module 'vscode' {

	export enum QuickInputButtonLocation {
		/**
		 * In the title bar.
		 */
		Title = 1,

		/**
		 * To the right of the input box.
		 */
		Inline = 2
	}

	export interface QuickInputButton {
		/**
		 * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.
		 * @note This property is ignored if the button was added to a QuickPickItem.
		 */
		location?: QuickInputButtonLocation;
	}
}

Here's an example of what inline looks like:

image
@TylerLeonhardt TylerLeonhardt added feature-request Request for new features or functionality quick-pick Quick-pick widget issues api-proposal labels Jul 10, 2024
@TylerLeonhardt TylerLeonhardt added this to the July 2024 milestone Jul 10, 2024
@TylerLeonhardt TylerLeonhardt self-assigned this Jul 10, 2024
TylerLeonhardt added a commit that referenced this issue Jul 10, 2024
* Fix a bug where the buttons would show up when they shouldn't by clearing them on show like the other ActionBars
* Introduce Proposed API (changed the core shape to reflect)
* Adopted in Git extension

ref #221397
TylerLeonhardt added a commit that referenced this issue Jul 10, 2024
* Fix a bug where the buttons would show up when they shouldn't by clearing them on show like the other ActionBars
* Introduce Proposed API (changed the core shape to reflect)
* Adopted in Git extension

ref #221397
@gjsjohnmurray
Copy link
Contributor

@TylerLeonhardt while there's an API proposal open for quick input buttons could it be extended to support a couple of other features?

  1. An optional when property with which we could hide/show buttons dynamically? At the moment I think our only option is modify the contents of the buttons array.
  2. Support for toggle buttons, per Option buttons for the inputs. #144956 (comment)

The second of these would be particularly useful for an extension I help maintain, but if it's not within sight then perhaps I will tackle a PR for #185356

Pinging @isc-bsaviano

@isc-bsaviano
Copy link

Toggle buttons would be awesome! That would a perfect solution to my problem that prompted #185356.

@TylerLeonhardt
Copy link
Member Author

TylerLeonhardt commented Jul 22, 2024

@gjsjohnmurray can you get an issue going for number 1?

We don't have toggles within sight at the moment... but do add your scenario to that issue which will help boost it.

@TylerLeonhardt
Copy link
Member Author

Closing this for endgame

@gjsjohnmurray
Copy link
Contributor

do add your scenario to that issue which will help boost it.

#144956 (comment)

@gjsjohnmurray
Copy link
Contributor

can you get an issue going for number 1?

#223489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-finalization feature-request Request for new features or functionality on-testplan quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

4 participants