🐛 Add Karmada Ops to sidebar search, rename Compliance to Sec. Compliance#4021
🐛 Add Karmada Ops to sidebar search, rename Compliance to Sec. Compliance#4021clubanderson merged 1 commit intomainfrom
Conversation
…ance - Add Karmada Ops to KNOWN_ROUTES so it appears in sidebar customizer search - Rename "Compliance" to "Sec. Compliance" in sidebar nav and customizer Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[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 @clubanderson — thanks for opening this PR!
This is an automated message. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
There was a problem hiding this comment.
Pull request overview
Updates the sidebar configuration and sidebar customizer route list so users can find and add the Karmada Ops dashboard via search, and clarifies the security compliance dashboard label to avoid confusion with Data Compliance.
Changes:
- Rename the
/compliancesidebar label from “Compliance” to “Sec. Compliance” (default primary nav + customizer known routes). - Add
/karmada-opsto the sidebar customizer’sKNOWN_ROUTESso it appears in search results.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
web/src/hooks/useSidebarConfig.ts |
Renames the default primary-nav item label for the /compliance route. |
web/src/components/layout/SidebarCustomizer.tsx |
Updates KNOWN_ROUTES to include Karmada Ops and renames Compliance to Sec. Compliance for add/search UX. |
| { id: 'dashboard', name: 'Dashboard', icon: 'LayoutDashboard', href: '/', type: 'link', order: 0 }, | ||
| { id: 'clusters', name: 'My Clusters', icon: 'Server', href: '/clusters', type: 'link', order: 1 }, | ||
| { id: 'cluster-admin', name: 'Cluster Admin', icon: 'ShieldAlert', href: '/cluster-admin', type: 'link', order: 2 }, | ||
| { id: 'compliance', name: 'Compliance', icon: 'ClipboardCheck', href: '/compliance', type: 'link', order: 2.5 }, | ||
| { id: 'compliance', name: 'Sec. Compliance', icon: 'ClipboardCheck', href: '/compliance', type: 'link', order: 2.5 }, | ||
| { id: 'deploy', name: 'Deploy', icon: 'Rocket', href: '/deploy', type: 'link', order: 3 }, |
There was a problem hiding this comment.
Changing the default nav item label to "Sec. Compliance" won’t update existing users who already have a sidebar config saved in localStorage: migrateConfig() only adds missing default routes (by href) and removes deprecated ones, but it never reconciles stored items’ name/icon with updated defaults. As a result, previously persisted /compliance items will still display "Compliance" until the user resets.
Consider extending migration to refresh properties for non-custom items whose href (or id) matches a known default (at least /compliance), while preserving user-added (isCustom) items and ordering.
🔄 Auto-Applying Copilot Code ReviewCopilot code review found 0 code suggestion(s) and 1 general comment(s). Also address these general comments:
Push all fixes in a single commit. Run Auto-generated by copilot-review-apply workflow. |
Summary
KNOWN_ROUTESin sidebar customizer — was missing from search resultsTest plan