feat(pinia): add expand/collapse functionality for store data structures #973
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Feature Overview
This PR implements the requested expand/collapse
functionality for Pinia Store data structures as requested
in issue #467.
β¨ What's Implemented
1. One-Click Operations for All Stores
state properties
a clean view
panel headers
2. Node-Level Hover Interactions
with children, quick action buttons appear
expanded/collapsed independently
guidance
3. Enhanced Search & Auto-Expansion
when searching to reveal matching content
auto-expansion
expansion context
4. Deep Nesting Support
data structures
state objects
references and edge cases
π― Addresses Issue Requirements
β Support for expanding/collapsing Pinia Store data
structures with a single click
β One-click operation for all Stores
β Expand/collapse operations for specific Store nodes (with
hover interaction)
β Pinia Store key-value pair retrieval (at the top of Store
panel)
β Enhanced UX compared to Components Tree management
π§ Technical Implementation
Core Files Modified:
packages/applet/src/modules/pinia/components/store/Index. vue
- Main store panel logicpackages/applet/src/components/tree/TreeViewer.vue
-Tree hover interactions
packages/applet/src/components/state/ChildStateViewer.vue
Key Features:
contexts for tree and state
search functionality
state management
support
π§ͺ Testing
The implementation has been thoroughly tested with:
πΈ Visual Demo
The functionality can be tested by:
π Result
This implementation provides the exact functionality
requested in issue #467, offering users intuitive and
efficient ways to navigate complex Pinia store structures,
significantly improving the development experience when
working with large state trees.
Closes #467