Skip to content

Commit

Permalink
Add ColorPickerArchitecture Doc (#3244)
Browse files Browse the repository at this point in the history
* Add initial ColorPickerArchitecture doc

* Complete ColorPicker architecture docs

* Make the ColorPicker architecture docs a readme

* Various fixes and improvements

* More fixes and improvements

* More fixes and improvements

* Updates based on feedback

* Separate ColorPicker improvements into their own file

* Add ColorPicker docs to solutions
  • Loading branch information
robloo authored Jan 7, 2021
1 parent 33dfd40 commit 1e5f2b6
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MUXControls.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ColorPicker", "dev\ColorPicker\ColorPicker.vcxitems", "{248CC96D-67A2-4359-A4E3-AB0DAD110A1E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ColorPicker", "ColorPicker", "{1F86207F-AF12-4C39-8ACD-AE751D312673}"
ProjectSection(SolutionItems) = preProject
dev\ColorPicker\improvements.md = dev\ColorPicker\improvements.md
dev\ColorPicker\readme.md = dev\ColorPicker\readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RatingControl", "RatingControl", "{3B0C114B-AC74-4BB1-975D-26FE5D505BD1}"
EndProject
Expand Down
4 changes: 4 additions & 0 deletions MUXControlsInnerLoop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ColorPicker", "dev\ColorPicker\ColorPicker.vcxitems", "{248CC96D-67A2-4359-A4E3-AB0DAD110A1E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ColorPicker", "ColorPicker", "{1F86207F-AF12-4C39-8ACD-AE751D312673}"
ProjectSection(SolutionItems) = preProject
dev\ColorPicker\improvements.md = dev\ColorPicker\improvements.md
dev\ColorPicker\readme.md = dev\ColorPicker\readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RatingControl", "RatingControl", "{3B0C114B-AC74-4BB1-975D-26FE5D505BD1}"
EndProject
Expand Down
11 changes: 11 additions & 0 deletions dev/ColorPicker/improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ColorPicker Improvements

This document lists ideas for future implementations and lessons learned that may not be adopted due to breaking changes. These improvements should be considered for future implementations of this or similar controls.

* RGB and HSV channels are identified separately in most places. For example, HSV channels are represented by the `ColorPickerHsvChannel` enum. Since HSV is used as the primary representation internally there is no corresponding enum for RGB channels. In the control template, however, there are separate controls depending on the active color representation RGB/HSV. This means there is a duplication of a large number of controls. These could all be unified, for example, by referring to both hue and red as channel 1, etc. This greatly simplifies the effort required in the control template itself and removes duplicate controls. Instead, the same input controls can be used and only the active color representation set. Internal representation could add an enum for Channel1, Channel2, Channel3 and Alpha.

* The 'ThirdDimension' slider really should not be named 'dimension'. 'Channel' is the standardized term so 'ThirdChannelSlider' would be a better choice. 'Components' is also the term used in control properties.

* The `ColorPickerSlider` could render its own background and be made a completely independent control. This would simplify the `ColorPicker` template and code-behind considerably.

* Composting of the preview/slider backgrounds with a checkered background underneath can be done all at once in code-behind when the background image is calculated. This would remove several template parts and greatly simplify the overall template. The affect on performance should be minimal and not detectable.
Loading

0 comments on commit 1e5f2b6

Please sign in to comment.