-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Closed
Labels
Milestone
Description
Refs: #132068
- anyOS @roblourens
- anyOS @dbaeumer
Complexity: 3
This iteration we added a new property on the QuickPick object that allows you to control whether or not the scroll position (cursorTop) in the quickpick moves back to the top of the list.
- Create a new extension
- Get the latest vscode.d.ts:
npx vscode-dts main - using the
QuickPickobject you get back from thewindow.createQuickPick()API, play with the newkeepScrollPosition: boolean
Usecases:
- Implementing a "remove this item from the list" using the also being finalized
QuickPickItemButtons (think, Ctrl/Cmd + PxQuickPickItemButton) - Implementing a "toggle this item in someway" using the also being finalized
QuickPickItemButtons (think, "Insert Snippet" command) - Asynchronously loading items in the quickpick (like
setIntervaladding an item to the list by reassigning the.itemsproperty... scroll shouldn't jump to the top)
Useful stuff
- Create an extension guide
- Extensions samples repo
- Add a finalized API:
npx vscode-dts main - Add a proposed API:
- First add the proposed API to the
package.json(see below) - Then run
npx vscode-dts devto get the typings
- First add the proposed API to the
"enabledApiProposals": [
"quickPickSeparators"
],Note the name of the proposed API is gathered from the file name in the vscode-dts folder