🌱 refactor: split MissionSidebar.tsx into focused sub-components#14339
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
|
| New file | Suggested test location |
|---|---|
web/src/components/layout/mission-sidebar/MissionListPanel.tsx |
web/src/components/layout/mission-sidebar/__tests__/MissionListPanel.test.tsx |
web/src/components/layout/mission-sidebar/MissionResolution.tsx |
web/src/components/layout/mission-sidebar/__tests__/MissionResolution.test.tsx |
web/src/components/layout/mission-sidebar/SidebarResizeHandle.tsx |
web/src/components/layout/mission-sidebar/__tests__/SidebarResizeHandle.test.tsx |
web/src/components/layout/mission-sidebar/useSidebarResize.ts |
web/src/components/layout/mission-sidebar/__tests__/useSidebarResize.test.tsx |
Checked against origin/main. Remove the needs-tests label once tests are added.
Extract clearly separable concerns from the 1877-line MissionSidebar.tsx: - useSidebarResize.ts: drag-to-resize hook with width persistence, viewport clamping, and tablet breakpoint detection - SidebarResizeHandle.tsx: the resize drag-handle UI element - MissionResolution.tsx: fullscreen knowledge/resolution side panel (saved missions list + related/history resolution panels) - MissionListPanel.tsx: scrollable mission history/library list (search, orbit button, saved missions, active missions, pagination) MissionSidebar.tsx shrinks from 1877 → 1551 lines and becomes a leaner orchestrator that composes the sub-components. No behavioral changes — same props, same rendering, same functionality. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-bot <kubestellar-bot@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-bot <kubestellar-bot@kubestellar.io>
3a4a979 to
2ee1669
Compare
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Fixes #14313