-
Notifications
You must be signed in to change notification settings - Fork 36.9k
Add toggle support to ActionBar and IQuickInputButton for toggle/button rendering #283724
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
|
@copilot I was expecting you to actually use it in the quick pick action bars ... |
Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
Applied the
These ActionBars will now automatically render any actions with a |
|
@copilot now you need to add the toggle shape to then you'll need to update the thing that turns buttons into actions |
…oAction Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
Added toggle shape to
Quick input buttons with a |
Adds
createToggleActionViewItemProvider()to enable ActionBar to render toggles for actions with acheckedproperty and buttons for regular actions, eliminating the need for custom provider boilerplate. Applied to all quick input ActionBars and added toggle property toIQuickInputButtonfor seamless integration.Changes
New API:
createToggleActionViewItemProvider(toggleStyles?: IToggleStyles)returns anIActionViewItemProviderthat:ToggleActionViewItemwhenaction.checked !== undefinedIQuickInputButton Enhancement: Added
toggle?: { checked: boolean }property toIQuickInputButtoninterface following the quickInputButtonLocation API proposal patternQuickInputButtonLocation.InputlocationquickInputButtonToAction Update: Modified to detect
button.toggleproperty and setaction.checkedaccordinglyTests: Added comprehensive test suite in
actionbar.test.tscovering:Quick Input Integration: Applied the provider to all quick input ActionBars:
quickInputController.ts: leftActionBar, rightActionBar, and inlineActionBarquickInputList.ts: list entry ActionBarUsage
Basic ActionBar Usage
Quick Input Button Usage
Original prompt
Start implementation
[Chronological Review: The conversation began with the user requesting modifications to the ActionBar in the `toggle.ts` file to allow rendering of Toggles in addition to Buttons. The user expressed a preference for a new class to facilitate testing. Subsequent messages confirmed the user's agreement with the proposed approach and emphasized that the view item provider should still render buttons when not toggles. The user then requested a full plan for implementation.][Intent Mapping:
[Technical Inventory:
/Users/tyleonha/Code/Microsoft/vscode/src/vs/base/browser/ui/toggle/toggle.ts[Code Archaeology:
toggle.tsfile, specifically around the ActionBar and its rendering capabilities. No specific code changes have been documented yet, but the user is preparing to implement a new class.][Progress Assessment:
[Context Validation: All critical information for continuation is captured, including the need for a new class, rendering requirements, and the user's request for a full plan.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: "I would like to give them an actionviewItemprovider that could render Toggles in addition to Buttons." The user aims to enhance the ActionBar functionality. - Session Context: The conversation flowed from initial requests for modifications to discussions about implementation structure and requirements for testability. - User Intent Evolution: The user started with a specific request and gradually clarified the requirements, emphasizing the need for a new class and the ability to render buttons alongside toggles.- Technical Foundation:
- File:
- Concepts: ActionBar, ActionViewItemProvider, Toggles, Buttons.
- Codebase Status:
- File Name:
- Purpose: To manage toggle and button rendering within the ActionBar.
- Current State: User is preparing to implement a new class for rendering.
- Key Code Segments: No specific segments have been modified yet.
- Dependencies: Relates to the ActionBar functionality and rendering logic.
- Problem Resolution:
- Issues Encountered: No specific technical problems have been documented yet.
- Solutions Implemented: User has proposed a new class structure for testing.
- Debugging Context: No ongoing troubleshooting efforts have been mentioned.
- Lessons Learned: The importance of maintaining button rendering alongside toggle functionality.
- Progress Tracking:
- Completed Tasks: User has outlined the need for a new class and confirmed rendering requirements.
- Partially Complete Work: Implementation of the new class and action view item provider is pending.
- Validated Outcomes: No features have been confirmed working yet.
- Active Work State:
- Current Focus: User is focused on planning the implementation of the ActionBar modifications.
- Recent Context: The user has been discussing the requirements for rendering buttons and toggles and requested a full plan.
- Working Code: No specific code snippets have been modified or discussed recently.
- Immediate Context: User is seeking a comprehensive implementation plan.
- Recent Operations:
- Last Agent Commands: User requested a full plan for the implementation.
- Tool Results Summary: No specific results were generated as the conversation focused on planning.
- Pre-Summary State: The agent was discussing the implementation plan when the token budget was exceeded.
- Operation Context: The commands were executed to clarify the user's goals and ensure a structured approach to th...
/Users/tyleonha/Code/Microsoft/vscode/src/vs/base/browser/ui/toggle/toggle.tstoggle.tsÇrëætëð frøm V§ Çøðë.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.