[scanner] fix: complete refresh icon animation consistency#21265
Conversation
Tie animate-spin on the SecurityComplianceTab refresh button to the actual refreshing state (dataRefreshing || securityLoading || securityRefreshing) propagated from Security.tsx. All other files flagged in #21261 were already addressed (either by PR #21264 or by earlier commits): the remaining RefreshCw usages are static semantic icons (metadata labels, section headers, history-type icons) that intentionally do not spin. Completes #21261 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@kubestellar.io>
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[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 |
|
🐝 Hi @clubanderson! I'm Trusted users — org members and contributors with write access — can mention Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies. |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
♿ Accessibility Audit (WCAG 2.1 AA)✅ No WCAG 2.1 AA violations detected in audited routes. Powered by axe-core. Target: WCAG 2.1 AA compliance. |
There was a problem hiding this comment.
Pull request overview
This PR finishes the refresh-icon animation consistency work for the Security dashboard by wiring an isRefreshing state into the remaining compliance refresh button, so the RefreshCw icon can spin while refresh work is in progress.
Changes:
- Extend
SecurityComplianceTabwith an optionalisRefreshingprop and conditionally applyanimate-spinto the refresh icon. - Pass a combined refresh/loading state from
Security.tsxintoSecurityComplianceTabso the tab’s refresh button reflects parent refresh activity.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/src/components/security/SecurityComplianceTab.tsx | Adds isRefreshing prop and uses it to drive RefreshCw spin animation. |
| web/src/components/security/Security.tsx | Passes combined refresh/loading state into SecurityComplianceTab. |
| <button | ||
| onClick={handleRefresh} | ||
| className="flex items-center gap-2 px-4 py-2 rounded-lg bg-secondary hover:bg-secondary/80 text-sm text-foreground transition-colors" | ||
| > | ||
| <RefreshCw className="w-4 h-4" /> | ||
| <RefreshCw className={cn('w-4 h-4', isRefreshing && 'animate-spin')} /> |
| className="flex items-center gap-2 px-4 py-2 rounded-lg bg-secondary hover:bg-secondary/80 text-sm text-foreground transition-colors" | ||
| > | ||
| <RefreshCw className="w-4 h-4" /> | ||
| <RefreshCw className={cn('w-4 h-4', isRefreshing && 'animate-spin')} /> |
|
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 Verification: passedCommit: |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Fixes #21261
Completes the work started in #21264 by applying the same refresh icon animation pattern to the one remaining component that had a real gap.
Changes
web/src/components/security/SecurityComplianceTab.tsxAdded
isRefreshing?: booleanprop to the component interface and used it to conditionally applyanimate-spinto theRefreshCwicon in the compliance refresh button. This is the only file from the issue's list that had both a clickable refresh button and an available loading state that was not being reflected in the icon animation.web/src/components/security/Security.tsxPasses
isRefreshing={dataRefreshing || securityLoading || securityRefreshing}toSecurityComplianceTabso the parent's combined refresh state drives the icon spin.Audit of remaining files from #21261
All other files flagged in the issue were audited and are already consistent:
feedback/FeatureRequestList.tsxcn('w-3 h-3', isLoading && 'animate-spin')feedback/UpdatesTabGitHubContributionsSection.tsxisGitHubRefreshing ? 'animate-spin' : ''feedback/UpdatesTab.tsxisRefreshing ? 'animate-spin' : ''events/Events.tsxrefreshingAll && 'animate-spin'rewards/RewardsPanel.tsxisRefreshing ? 'animate-spin' : ''compliance/SegregationOfDuties.tsxloading && 'animate-spin'compliance/ChangeControlAudit.tsxisRetrying && 'animate-spin'compliance/DataResidency.tsxisRetrying && 'animate-spin'history/CardHistory.tsxsettings/UpdateSettingsForm.tsxsettings/sections/PersistenceSection.tsxsyncing ? 'animate-spin' : ''settings/sections/ProfileSection.tsxisSaving && 'animate-spin'settings/sections/AgentSection.tsxisRefreshing ? 'animate-spin' : ''settings/sections/TokenUsageSection.tsxsettings/sections/AgentBackendSettings.tsxisRefreshing ? 'animate-spin' : ''settings/sections/LocalClustersSection.tsxisLoading ? 'animate-spin' : ''settings/sections/GitHubTokenSection.tsxtokenTesting ? 'animate-spin' : ''acmm/RepoPicker.tsxscan.isRefreshing ? 'animate-spin' : ''widget/MiniDashboard.tsxisRefreshing && 'animate-spin'gitops/GitOps.tsxterminal/PodExecTerminal.tsxPageErrorBoundary.tsxdashboard/ReplaceCardModal.tsxdashboard/ResetDialog.tsxdrilldown/DrillDownModal.tsxdrilldown/RemediationConsole.tsxisExecuting ? 'animate-spin' : ''drilldown/views/ArgoAppDrillDown.tsxdrilldown/views/RBACDrillDown.tsxrefreshing && 'animate-spin'drilldown/views/DeploymentDrillDown.tsxisRefreshing && 'animate-spin'drilldown/views/HelmReleaseDrillDown.tsxdrilldown/views/OperatorDrillDown.tsxdrilldown/views/KustomizationDrillDown.tsxdrilldown/views/PodDrillDown.tsxisRefreshing && 'animate-spin'drilldown/views/YAMLDrillDown.tsxisLoading ? 'animate-spin' : ''drilldown/views/LogsDrillDown.tsxisLoading ? 'animate-spin' : ''drilldown/views/pod-drilldown/PodRelatedTab.tsxrelatedLoading && 'animate-spin'drilldown/views/pod-drilldown/PodAiAnalysis.tsxaiAnalysisLoading && 'animate-spin'drilldown/views/pod-drilldown/PodOutputTab.tsxdrilldown/views/EventsDrillDown.tsxisLoading ? 'animate-spin' : ''drilldown/views/PolicyDrillDown.tsxdrilldown/views/BuildpackDrillDown.tsxsetup/DeveloperSetupDialog.tsxcards/karmada_status/KarmadaStatus.tsxisRefreshing ? 'animate-spin' : ''cards/openyurt_status/OpenYurtStatus.tsxcards/otel_status/index.tsxisRefreshing ? 'animate-spin' : ''cards/failover_timeline/FailoverTimeline.tsx