Update new web GUI dependencies#810
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades package dependencies for the new web GUI, focusing on migrating from the alpha release @mui/lab TreeView components to the more stable @mui/x-tree-view package. The changes ensure compatibility with the updated API while maintaining existing functionality.
- Migration from
@mui/labTreeView to@mui/x-tree-viewpackage - Updates to TreeView event handlers to support the new API signature
- Package dependency version upgrades across development and runtime dependencies
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| webgui-new/package.json | Removes @mui/lab dependency, adds @mui/x-tree-view, and updates all package versions |
| webgui-new/src/components/*/styled-components.tsx | Updates TreeView imports from @mui/lab to @mui/x-tree-view |
| webgui-new/src/components/*/component.tsx | Updates TreeView event handlers to handle new API signature that accepts string or string array |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return (_e: SyntheticEvent<Element, Event>, nodeIds: string | string[]) => { | ||
| // Handle both single string and array of strings | ||
| const nodeId = Array.isArray(nodeIds) ? nodeIds[0] : nodeIds; | ||
| if (!nodeId) return; |
There was a problem hiding this comment.
[nitpick] The logic for extracting the first nodeId is duplicated across multiple event handlers. Consider creating a utility function to handle this conversion pattern.
| return (_e: SyntheticEvent<Element, Event>, nodeIds: string | string[]) => { | ||
| // Handle both single string and array of strings | ||
| const nodeId = Array.isArray(nodeIds) ? nodeIds[0] : nodeIds; | ||
| if (!nodeId || !expandedFileNodes) return; |
There was a problem hiding this comment.
[nitpick] The nodeId extraction pattern is duplicated here as well. This reinforces the need for a shared utility function to handle the nodeIds parameter conversion.
Upgrade package dependencies of the new web GUI. No major version upgrades.
Replacing
TreeViewfrom the alpha releases of@mui/labwith the more mature and stable@mui/x-tree-viewpackage.