Skip to content

feat: uniform UI margins and theme-aware warning brushes#618

Open
laurentiu021 wants to merge 1 commit into
mainfrom
refactor/ui-uniformity-round-4
Open

feat: uniform UI margins and theme-aware warning brushes#618
laurentiu021 wants to merge 1 commit into
mainfrom
refactor/ui-uniformity-round-4

Conversation

@laurentiu021
Copy link
Copy Markdown
Owner

Summary

Round 4 of the post-1.18.0 audit fixes — UI uniformity sweep. Three categories of visual inconsistency consolidated, all decisions confirmed by user.

What changed

1. Outer container margins — 28,24,28,16 everywhere

13 views were using Margin="32,24" while Dashboard and AppAlerts used the documented standard 28,24,28,16. Migrated all to the standard:
BatteryHealth, BulkInstaller, ContextMenu, DiskAnalyzer, Drivers, DuplicateFile, Performance, Privacy, ProcessManager, Services, Startup, Uninstaller, WindowsFeatures.

The whole nav now has identical horizontal padding when switching tabs.

2. Page background — theme-aware

15 views were each defining a per-file LinearGradientBrush x:Key="PageBg" resource (3 hardcoded hex stops: #070A0F/#0B1220/#090D16) and then setting Grid.Background="{StaticResource PageBg}". Net effect: ~75 hardcoded color references that broke theme switching.

Replaced everywhere with Background="{DynamicResource Surface0}" (the theme-managed root surface brush, identical visual color in dark mode). The local <UserControl.Resources><LinearGradientBrush> blocks are gone; non-PageBg resources (e.g., FileShredderView's ObjectDataProvider, LogsView's local styles) are preserved.

3. Warning category brushes — defined once, reused

The admin elevation banner (and a few warning pills) duplicated 4 amber hex values across 17 views: #1AFBBF24, #40FBBF24, #FBBF24, #FCD34D. Defined them once in App.xaml:

<SolidColorBrush x:Key="WarningBgSubtle" Color="#1AFBBF24"/>
<SolidColorBrush x:Key="WarningBg" Color="#40FBBF24"/>
<SolidColorBrush x:Key="WarningStripe" Color="#FBBF24"/>
<SolidColorBrush x:Key="WarningText" Color="#FCD34D"/>

Replaced all 4 hex literals across 17 views with {DynamicResource ...}. Future tweaks to the warning palette are now a one-line change in App.xaml.

Not in this PR

  • AdminBanner UserControl extract — the 7 views with duplicated banner markup still each carry the full XAML for the banner. Extracting it to a reusable Views/AdminBanner.xaml UserControl with DependencyProperty for the message text is a non-trivial refactor with its own design risk; left for a focused follow-up.

Files

33 files changed, 103 insertions, 193 deletions (net cleanup):

  • App.xaml — 4 new Warning* brushes
  • 33 view XAMLs — margin/background/color updates
  • CHANGELOG.md[1.19.0] entry
  • SysManager.csproj — bump to 1.19.0 (user-visible UI change → minor bump)

Test plan

  • dotnet build Release: 0 warnings, 0 errors (main project)
  • CI build + unit tests + UI tests
  • CodeQL clean
  • Visual smoke test on local Windows after release: open every nav tab, verify margins look identical, verify admin banners (elevated and non-elevated) render correctly, verify backgrounds render in dark mode without artifacts

- 13 views migrated from Margin="32,24" to canonical "28,24,28,16" (BatteryHealth, BulkInstaller, ContextMenu, DiskAnalyzer, Drivers, DuplicateFile, Performance, Privacy, ProcessManager, Services, Startup, Uninstaller, WindowsFeatures)
- 15 views: drop hardcoded LinearGradientBrush PageBg, use {DynamicResource Surface0} on root Grid (removes 5 lines per file, theme-aware)
- 17 views: replace hardcoded amber hex (#1AFBBF24, #40FBBF24, #FBBF24, #FCD34D) with new App.xaml theme brushes WarningBgSubtle, WarningBg, WarningStripe, WarningText
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@laurentiu021, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d41e0771-2d0f-4fee-ac53-d14b0851b1a7

📥 Commits

Reviewing files that changed from the base of the PR and between 755733e and 8c6c6ee.

📒 Files selected for processing (33)
  • CHANGELOG.md
  • SysManager/SysManager/App.xaml
  • SysManager/SysManager/SysManager.csproj
  • SysManager/SysManager/Views/AboutView.xaml
  • SysManager/SysManager/Views/AppBlockerView.xaml
  • SysManager/SysManager/Views/AppUpdatesView.xaml
  • SysManager/SysManager/Views/BatteryHealthView.xaml
  • SysManager/SysManager/Views/BulkInstallerView.xaml
  • SysManager/SysManager/Views/CleanupView.xaml
  • SysManager/SysManager/Views/ContextMenuView.xaml
  • SysManager/SysManager/Views/DashboardView.xaml
  • SysManager/SysManager/Views/DeepCleanupView.xaml
  • SysManager/SysManager/Views/DiskAnalyzerView.xaml
  • SysManager/SysManager/Views/DnsHostsView.xaml
  • SysManager/SysManager/Views/DriversView.xaml
  • SysManager/SysManager/Views/DuplicateFileView.xaml
  • SysManager/SysManager/Views/FileShredderView.xaml
  • SysManager/SysManager/Views/LogsView.xaml
  • SysManager/SysManager/Views/NetworkRepairView.xaml
  • SysManager/SysManager/Views/PerformanceView.xaml
  • SysManager/SysManager/Views/PingView.xaml
  • SysManager/SysManager/Views/PlaceholderView.xaml
  • SysManager/SysManager/Views/PrivacyView.xaml
  • SysManager/SysManager/Views/ProcessManagerView.xaml
  • SysManager/SysManager/Views/ServicesView.xaml
  • SysManager/SysManager/Views/ShortcutCleanerView.xaml
  • SysManager/SysManager/Views/SpeedTestView.xaml
  • SysManager/SysManager/Views/StartupView.xaml
  • SysManager/SysManager/Views/SystemHealthView.xaml
  • SysManager/SysManager/Views/TracerouteView.xaml
  • SysManager/SysManager/Views/UninstallerView.xaml
  • SysManager/SysManager/Views/WindowsFeaturesView.xaml
  • SysManager/SysManager/Views/WindowsUpdateView.xaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/ui-uniformity-round-4

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant