Skip to content

Extract PowerDisplay.Models to decouple Settings.UI from PowerDisplay…#46489

Draft
moooyo wants to merge 1 commit intomainfrom
yuleng/pd/1
Draft

Extract PowerDisplay.Models to decouple Settings.UI from PowerDisplay…#46489
moooyo wants to merge 1 commit intomainfrom
yuleng/pd/1

Conversation

@moooyo
Copy link
Copy Markdown
Contributor

@moooyo moooyo commented Mar 25, 2026

….Lib

  • Create PowerDisplay.Models project with shared model types (ColorPresetItem, CustomVcpValueMapping, PowerDisplayProfile, PowerDisplayProfiles, ProfileMonitorSetting) and ProfileHelper/ProfileSerializationContext
  • Remove Settings.UI and Settings.UI.Library dependency on PowerDisplay.Lib
  • Clean up VcpNames: remove LocalizedCodeNameProvider, GetValueMappings, GetFormattedValueName with custom mapping overload (keep 4 methods)
  • Refactor ProfileService: delegate Load/Save to ProfileHelper, remove unused methods (ProfilesFileExists, GetProfilesFilePath), simplify IProfileService interface
  • Remove legacy CustomProfileName constant and cleanup code
  • Add CustomVcpValueMappingExtensions in Lib for rich display properties
  • Create MonitorStateSerializationContext for Lib-local state types

Summary of the Pull Request

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

….Lib

- Create PowerDisplay.Models project with shared model types (ColorPresetItem,
  CustomVcpValueMapping, PowerDisplayProfile, PowerDisplayProfiles,
  ProfileMonitorSetting) and ProfileHelper/ProfileSerializationContext
- Remove Settings.UI and Settings.UI.Library dependency on PowerDisplay.Lib
- Clean up VcpNames: remove LocalizedCodeNameProvider, GetValueMappings,
  GetFormattedValueName with custom mapping overload (keep 4 methods)
- Refactor ProfileService: delegate Load/Save to ProfileHelper, remove
  unused methods (ProfilesFileExists, GetProfilesFilePath), simplify
  IProfileService interface
- Remove legacy CustomProfileName constant and cleanup code
- Add CustomVcpValueMappingExtensions in Lib for rich display properties
- Create MonitorStateSerializationContext for Lib-local state types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@moooyo moooyo self-assigned this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant