Skip to content

Add brand management system for reusable QR code settings#49

Merged
TheJoeFin merged 18 commits intomainfrom
brands
Mar 31, 2026
Merged

Add brand management system for reusable QR code settings#49
TheJoeFin merged 18 commits intomainfrom
brands

Conversation

@TheJoeFin
Copy link
Copy Markdown
Owner

@TheJoeFin TheJoeFin commented Mar 28, 2026

Summary

  • Adds a Brand feature allowing users to save, apply, and manage reusable sets of QR code settings (foreground/background colors, error correction level, logo, etc.)
  • New BrandItem model with JSON serialization (including nullable color support via ColorJsonConverter)
  • BrandStorageHelper for local persistence of brand presets
  • BrandEditDialog and ColorPickerButton controls for creating/editing brands
  • BrandRowItem control for displaying brands in a list with a default brand indicator
  • MainViewModel updated with brand selection, apply, edit, delete, and set-default commands
  • MainPage updated with a brand ComboBox, context menu actions, and auto-apply of the default brand on navigation
  • Replaces error correction ComboBox with a DropDownButton and adds short/long description support to ErrorCorrectionOptions

Test plan

  • Create a new brand with custom colors, error correction level, and logo — verify it appears in the brand list
  • Apply a brand and confirm QR code settings update accordingly
  • Set a brand as default and navigate away/back — verify it auto-applies
  • Edit an existing brand and verify changes are saved
  • Delete a brand and verify it is removed from the list
  • Verify brands persist across app restarts
  • Test on both x64 and ARM64 builds

🤖 Generated with Claude Code

Introduces a "Brand" feature for saving, applying, and managing reusable sets of QR code settings (colors, error correction, logo, etc.). Adds BrandItem model with JSON serialization, including nullable color support. Implements BrandStorageHelper for local persistence. Updates MainViewModel and UI to support brand creation, selection, and deletion. Replaces error correction ComboBox with DropDownButton and improves option display. Adds BrandRowItem control and supporting serialization files. Updates ErrorCorrectionOptions for short/long descriptions.
Introduce BrandEditDialog for editing brand details with full UI and MVVM support. Add ColorPickerButton user control for color selection. Update BrandRowItem to display a default brand icon. Integrate supporting converters and resources for color, image, and visibility binding.
Introduced a new boolean property, IsDefault, to the BrandItem class with a default value of false. This property can be used to indicate whether a brand item is the default selection.
Introduce SelectedBrand property and async ApplyBrand method in MainViewModel. Add support for editing, deleting, and setting default brands with new commands and UI handlers. Update MainPage XAML with a ComboBox for brand selection and context menu actions in the brand ListView. Ensure atomic property updates when applying brands and auto-apply default brand on navigation. Improve binding readability throughout.
Enable selecting and editing QR code error correction levels in both the brand edit dialog and new brand form. Update UI and view models to support enabling/disabling error correction and choosing the level. Improve ComboBox selection logic and clean up property change handling. Minor naming and code consistency improvements.
Revised FAQ entries to cover the new Brands feature and in-app logo controls. Updated BrandPickerComboBox width and Brands button tooltip. Added "Learn more about Brands" link in the Brands flyout with handler to open the relevant FAQ section.
Update raster logo loading to copy Bitmap from stream,
ensuring no internal reference remains after stream disposal. This
prevents Save() failures caused by disposed streams.
Introduces a new UserControl that enables users to pick an image, preview it letterboxed, and select colors directly from the image via pointer interaction. The control displays a crosshair and color preview on hover, and suggests dominant colors as clickable swatches. Supports Color and DefaultImagePath dependency properties and uses ImageMagick for color extraction.
Added a segmented control to ColorPickerButton for switching between color and image modes. Introduced DefaultImagePath property to support image color picking. Updated BrandEditDialog to pass LogoPath as DefaultImagePath. Changed AllCorrectionLevels to a property and fixed ComboBox binding. Updated logic to handle color changes from both pickers. Added required CommunityToolkit.WinUI controls packages.
Modernize BrandEditDialog UI using CommunityToolkit.WinUI SettingsCard and SettingsExpander controls. Replace CheckBoxes with ToggleSwitches, streamline logo image picker, and add dynamic slider descriptions. Update code-behind for property notifications and add required NuGet package. Update settings.local.json for new tools.
Modernize SettingsPage.xaml using CommunityToolkit's SettingsExpander and SettingsCard for a more organized, categorized, and visually appealing layout. Group settings into collapsible sections with icons and descriptions. Apply minor XAML formatting and property order improvements to BrandRowItem.xaml, ColorPickerButton.xaml, and ImageColorPickerControl.xaml. No business logic changes; all updates are UI/UX enhancements.
Introduced a FeedbackDialog for user feedback via email or copy. Updated SettingsPage with a "Rate and Review" card using RatingControl. High ratings prompt a Microsoft Store review; lower ratings open the feedback dialog. Project file updated to include new dialog resources.
Added commands to open Microsoft Store pages for Simple Icon FileMaker and TextGrab in SettingsViewModel. Updated SettingsPage with a new expander listing these apps and a link to the developer's website. Added an empty SettingsExpander_Expanded handler.
Enhanced color picking by increasing thumbnail size and quantization count, filtering out transparent and unsaturated colors, and selecting up to 6 visually distinct, saturated mid-tones using HSL and RGB distance. Added helper methods for HSL conversion and color distance.
Added a check to avoid reassigning IsDefault when the selected brand is already set as default. This ensures only one brand is marked as default and reduces unnecessary property updates.
@TheJoeFin TheJoeFin merged commit 275b172 into main Mar 31, 2026
@TheJoeFin TheJoeFin deleted the brands branch March 31, 2026 02:14
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