voyager
voyager copied to clipboard
UI for customizing constant value (for valuedef)
Model
-
[x] We need to make values of non-position channels in
SpecificEncoding
beShelfFieldDef | ShelfValueDef
. (For now declare,type ShelfValueDef = ValueDef;
is sufficient.) -
[x] Update toEncodingQuery, fromEncodingQuery
-
[x] This will involve some refactor throughout the projects as we need to add some type guards and some type checking since encoding's definition can be either a
ShelfFieldDef
or aShelfValueDef
.
Reducer
- [x]
SPEC_VALUE_CHANGE
- [x] unit test
UI
-
[ ] popup -- add new
ValueCustomizer
component, takingFieldCustomizer
as inspiration. (Or rename it to a single ChannelDefCustomizer if you think it is better to have only one component. I think two is better though.)- [ ] For each channel, you probably need different UI
- color: Need a color picker
- size, opacity: input slider with number? -- look at filter -- you may want to use the same component if possible. If not possible, make the style consistent.
- shape: select box
- text: free form text
- detail: does not support value
-
PropertyEditor
could be useful.
- [ ] For each channel, you probably need different UI
-
What to show in the UI if
value
isundefined
- The UI should read VL default and always display something
- [ ] First version could just say "auto"
- [ ] Then Ham will help provide a method to read the default value of mark in VL
- [ ] The model should have
undefined
stored -- so we don't have make reducer hairy (needing to replace empty field with default value.)
Just noticed this vega example picks color like below.
Not saying this is the way to go for Voyager, but I want to mark this example.
Thanks, mac has native color picker that works pretty well. I don't know how it works in Linux / windows though. If there is a good standard, then we shouldn't reinvent the wheel. :)