Skip to content

Conversation

@splo
Copy link
Owner

@splo splo commented Jan 6, 2026

Add an Expand/Collapse toggle button on the top right of the components and resources views.
imageimage
Left: all components collapsed. Right: any component expanded.

Copilot AI review requested due to automatic review settings January 6, 2026 18:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds expand/collapse all functionality for components and resources views in a Bevy Inspector VS Code extension. Users can now toggle all collapsible sections at once via toolbar buttons.

Key changes:

  • Introduced a global state tracking mechanism for collapsible items using a shared reporter module
  • Added bidirectional communication between the extension and views to synchronize collapse/expand state
  • Registered new commands and toolbar buttons for expand/collapse all actions in both components and resources views

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/schema-components/collapsibleReporter.ts New module that tracks which collapsible items are expanded using a global Set and reports state changes
src/schema-components/TypedValueDetails.tsx Enhanced to manage collapsible state, respond to expand/collapse all commands, and report individual state changes
src/resources-view/components/ResourcesView.tsx Updated to subscribe to collapsible state changes and pass them to TypedValueDetails components
src/components-view/components/ComponentsView.tsx Updated to subscribe to collapsible state changes and pass them to TypedValueDetails components
src/inspector-data/messages.ts Added new message types for collapsible state synchronization between extension and views
src/extension/resources/resourcesController.ts Added expand/collapse all command handlers and state tracking for resources view
src/extension/components/componentsController.ts Added expand/collapse all command handlers and state tracking for components view
package.json Registered new expand/collapse commands with appropriate icons and conditional visibility based on state

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@splo splo merged commit fd676f2 into main Jan 7, 2026
@splo splo deleted the collapse-expand-all branch January 7, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants