Replies: 1 comment
-
My leanings right now are (E) since it is a currently available working solution (albeit one that requires some CSS acrobatics, at least for the time being), where we can prioritize a full blown component if there is demand/need from the community. If we were to proceed, I'd probably start with (C) or (D), which I believe should be fairly similar implementations "under the hood", especially if we add well-defined slots to (D). These fit well with our current UI architecture, and some of the negatives can be mitigated with smarter CSS or other minor tweaks (e.g. category attributes, more reliance on classes in our examples/"recipes", etc.). Both (A) & (B) add complexity to existing components that for now are "single purpose" and reasonably simple. I'd be concerned about decisions that start baking in more and more complexity into "primitive" components when we can instead "compose" more advanced components out of the primitive ones. |
Beta Was this translation helpful? Give feedback.
-
Re-posting in discussions so we can close #40
Publishing my neurosis here for entertainment and in case anyone has an interesting view point.
I'm working on example of audio players, and I'm feeling compelled to use a volume control that reveals itself rather than is aways visible, because audio players tend to be on the smaller side.
For an example of sliding-out/revealing audio controls see the youtube player or the default chrome controls for audio (and video).
Because this requires a relationship between the mute-button and the volume-range, the possible implementations then balloon out of control, with various benefits and costs of each.
All that to say, I think the short term answer is to do nothing for now, and rely on the themes (Option E), at least until we have a clearer understanding of how theming will work and where the challenges will be.
Volume Control Notes
Option A: Set sibling relationship
Positives
Negatives
Option B: Child volume range
Positives
Negatives
Option C: Single combined control
Positives
Negatives
Option D: A parent element to combine them
Positives
Negatives
control-bar > *
to style direct children of the control bar and avoid styling everything deeper. Couldn't do that anymore.Option E: Put it on the themes to handle
A very real option here is to not provide this feature at the component level. In the youtube them it's all in the CSS. It's a complex interaction that would be nice to simplify out of the box, but maybe not at the risk of making all other styling more complex.
Beta Was this translation helpful? Give feedback.
All reactions