[ColorPicker] [DX] Do not couple dropdown capabilities with picking functionality in 1.0.0 #1923
renatodeleao
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
note: I understand that this
ColorPicker
is a "preview" component and subject to many changes including breaking ones like this.Before (
0.7.0
) I could displayColorPicker
parts as I wanted to fit my design. A common usecase present in most design tools is that they all have color grading controls in a drawer panel that it's just there, rendered inline, you don't need to click any trigger for it to display or for controls to become active and usable.With the new version
0.9.0
, and the introduction of dropdown/positioning functionality it took me a while to redo the same demo.The main struggle was that the previous demo relied on the
Content
part which was mostly static before, but in the new version this part is now influenced byopen
state and it influences its children parts:Area
andChannelSlider
inContent
renders them disabled unlessopen=true
is passed to theRoot
part.Content
anywaysopen
prop is not reactive, so manually setting it back to true will not keep it openWorkaround
not render
Content
part and hardcodeopen:true
prop on theRoot
part.Idea/suggestion for v1
Content
partopen
was omitted and there were noTrigger/Content
parts, assume that render is inline a default to true so that we don't have to explicitly pass:open="true"
open
is not expected to be reactive, then it should be renameddefaultOpen
to match the current convention of static props.Demos
@ark-ui/[email protected]
@ark-ui/[email protected]
including the quirks abovementionedCheers ✌️
Beta Was this translation helpful? Give feedback.
All reactions