Skip to content

Add compact mode to XGPM#112

Merged
WilliamsJason merged 20 commits intomainfrom
user/kush/resizable-compact-mode
Apr 3, 2026
Merged

Add compact mode to XGPM#112
WilliamsJason merged 20 commits intomainfrom
user/kush/resizable-compact-mode

Conversation

@dkushmerick
Copy link
Copy Markdown
Collaborator

Add Compact Mode to Xbox Game Package Manager

Introduces a compact layout mode for developers who want to keep XGPM visible alongside their IDE or build tools
without it taking over screen real estate.

What's new:

  • Toggle compact mode via the layout button in the title bar
  • Switches from the standard multi-column card layout to a streamlined single-column view
  • Surfaces only the essential actions (sign in, create package, upload package, upload loose files) with
    full-width buttons and clean spacing
  • Hides descriptive text to reduce visual noise in constrained windows
  • All sizing and spacing is driven by a dedicated Sizes.Compact.xaml resource dictionary, keeping compact styles
    isolated from the default layout

elahmed-microsoft and others added 20 commits March 2, 2026 14:06
- Enable window resizing (ResizeMode=CanResize, MinWidth=600, MinHeight=400)
- Replace hardcoded column widths with flexible star-sizing across all views
- Add ScrollViewers to all content views for overflow handling
- Add compact mode toggle in title bar with persistent setting
- Compact mode reduces font sizes, padding, margins, and control heights
- Window auto-resizes to 800x550 (compact) or 1200x800 (standard)
- Maximize/restore icon updates with window state changes
- All functionality and previews preserved

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…compact-mode

# Conflicts:
#	src/PackageUploader.UI/View/UploadingFinishedView.xaml
- Ultra-compact home screen: button-only cards, no borders, 50% width centered
- Info tooltip buttons with shared InfoIconGeometry resource
- Fix thread safety: lock LoadSetting() in CompactModeProvider
- Fix resource dictionary insertion: find theme index dynamically
- Fix PercentageConverter: guard NaN/Infinity, return UnsetValue on failure
- Fix compact window size to respect MinWidth constraint (600x420)
- Replace hardcoded 'Upload Loose (PC)' with localized resource string
- Remove redundant IsNotCompactMode, use InverseBooleanConverter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Hide explanatory text on form views in compact mode
- Single-column stacked preview layout for compact (Dest/Market, StoreId/Size/Family)
- Smaller preview font (10px), image (40px top-aligned), tighter padding
- Inline back arrow + page title on all three form views
- Top-align preview panels on Upload and Msixvc2 views
- Rename 'Destination' field label to 'Branch' (en, ja-JP, ko-KR, zh-CN)
- Fix compact mode toggle: BaseViewModel broadcasts IsCompactMode via WeakReference tracking
- Fix settings.json race condition: shared SettingsFileLock across BaseViewModel and CompactModeProvider
- Remove Console.WriteLine from BaseViewModel (use silent catch)
- Remove unused CompactModeProvider injection from MainPageViewModel
- Add PreviewFontSize, PreviewImageSize, PreviewPadding, PreviewItemMargin resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ProgressHeadingMargin and ProgressSectionMargin DynamicResources
- Fix Msixvc2UploadingView hardcoded margins (300px, 130px image)
- Add 12px spacing between progress labels on upload screens
- Center upload stats text instead of hardcoded side margins

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ized tooltips

- Fix settings race: CompactModeProvider now routes all reads and writes
  through BaseViewModel's shared in-memory cache (SetExternalSetting /
  GetExternalSetting) instead of doing independent file I/O. This prevents
  BaseViewModel.SaveSettings() from overwriting compact mode preference
  with a stale value whenever any other setting changes.

- Fix fragile themeIndex in ApplyCompactMode: replaced the capture-during-
  removal-loop pattern with a fresh index query after all removals. The old
  approach was safe only due to current dictionary order; this version is
  order-independent.

- Localize compact mode button tooltips and AutomationProperties.HelpText:
  added CompactModeTooltipCompact, CompactModeTooltipExpand, and
  CompactModeHelpText to MainPage.resx and all three locale variants
  (ja-JP, ko-KR, zh-CN). MainWindow.xaml and .cs now use these strings.

- Add compact validator expander on PackagingFinished screen: in compact
  mode, submission validator errors collapse into an Expander so the
  action buttons are never pushed off-screen.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Increase ControlMinHeight from 24 to 30 for taller buttons
- Increase InputMinHeight from 26 to 30 for consistency
- Increase ButtonPadding from 6,2 to 10,5 for more internal padding
- Increase CardBottomMargin from 4 to 15 for more space between buttons
- Widen compact button group from 50% to 70% of window width

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Increase HeadlineMargin top from 6 to 25 in compact mode to push
  content down from the title bar
- Revert accidental per-button margin override on Make a Package row

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve conflicts between compact mode UI and MSIXVC2 support:
- Keep DynamicResource-based margins/padding throughout (vs hardcoded values in main)
- Keep compact mode visibility bindings in MainPageView and Msixvc2UploadView
- Accept corrected 'Destination' label from main in Msixvc2Upload.resx

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@WilliamsJason WilliamsJason merged commit d72bcbc into main Apr 3, 2026
7 of 8 checks passed
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.

3 participants