-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating UI components is too damn hard! #92
Comments
Thank you for proposing a session! You may update the session description as needed and at any time before the meeting, but please keep in mind that tooling relies on issue formatting: follow the instructions and leave all headings and other formatting intact in particular. Bots and W3C meeting organizers may also update the description, to fix formatting issues or add links and other relevant information. Please do not revert these changes. Feel free to use comments to raise questions. Do not expect formal approval; W3C meeting organizers endeavor to schedule all proposed sessions that are in scope for a breakout. Actual scheduling should take place shortly before the meeting. |
This is an important topic and I would love to attend, but I need to be at #28. Hopefully there are good notes! |
There's some potential overlap with #27. Just wanted to point that out in the hopes of being efficient with time an consolidating appropriate discussion. |
Not sure I'll be able to attend this as I have the same overlap with #28 as @justinfagnani, so just capturing a few thoughts...
A lot of this customization API seems ok to me as it's trying to expose a lot of power, but I totally agree that doing something simple is pretty clearly way too hard. If we start with
|
@sorvell @justinfagnani All of these were listed as explicit conflicts, yet this breakout was scheduled at the same time as them, defeating the point of listing conflicts. 😣 When I pointed it out, the response was basically "scheduling is hard". WRT design tokens, having spent some time knee deep in the math for generating tints and shades, I can say that it won’t be anytime soon we get functions that generate tints and shades in CSS — there is no color space to automatically do what designers expect (OKLCH just makes it easier, but you still need to adjust multiple components). But I agree being able to at least communicate main colors and have components derive the tints is a huge step. And there is a lot that can be done to make it less painful to pass multiple values around (see some of the linked proposals). |
@LeaVerou Just wanted to say thanks for raising this issue. It'll be great to make some progress on it. What I was trying to say above (and as you hint at with the complexities of color), we probably want/need all the dials that the web awesome video shows, but ideally there's a much better ramp to the use case shown there from the "I just want this UI template to be more blue instead of purple-y" use case. And I suppose this is pretty much what is motivating this session? This is why I linked the Material Theme Builder. If we can get to a place in raw CSS where we can do that without a tool, it seems like we've moved the ball forward a good bit. For example, from simplest to most custom, I could specify: 1 color, a set of role colors, a full palette, component specific settings, any of those conditionally applied to a subtree. If we do move forward on some of the important work in progress: custom functions/mixins and better built-in functions, this might get us most of the way there. I do also think that variable groups and improved shadow theming are also important to throw into the mix. Hopefully, we can think the use cases through to see if it feels like this work is converging towards a good solution here. |
@sorvell Even variable groups by themselves don't solve the problem, as there is no shared convention. Reading this comment makes me think I may not have explained the issue well. Suppose you’re making a WC for e.g. a calendar widget.
Right now, each component needs to reinvent all of these, and simply provide customization hooks via dozens, sometimes hundreds of CSS variables that page authors painfully need to override one by one. Adding functionality via web components should not be so tightly coupled with how you do your styling. |
Crafting a good styling API that's both easy to use and powerful enough is a challenge for any author vending a reusable UI element or component or template. Without encapsulation it's possible to completely punt on, but even then the user must at least know what elements are rendered to style them properly. Unfortunately, built-in elements themselves do not really provide a good model to follow. From Design systems have shown the power of leveraging tokens and that maps pretty well to css custom properties. We don't have a standard set of browser "tokens" that are helpful, more things like |
Session description
The vision of authors being able to drop components and UI libraries into their pages and have things Just Work™ and look right (at least to a first order approximation) is still largely unrealized. Integrating any UI component is incredibly laborious, as it requires manually communicating fine grained design tokens to every single component.
This Web Awesome tutorial illustrates the problem perfectly:
https://youtu.be/JhfYeXLfWdI?si=vF3xRai2QrjabVFv&t=277
And this is just for assigning a certain hue as the primary color of a whole page — the effort is duplicated for every third-party UI component that uses colors, fonts, measurements, font sizes, etc. Same-party components can use the same naming convention to reduce effort, but that doesn't work for components from different entities.
To reduce integration effort, we need to reduce the amount of information the host page needs to communicate about its design to each individual component. Some avenues are:
Session goal
Flesh out ideas for potential directions, see which are most viable in terms of I/E
Additional session chairs (Optional)
@keithamus
Who can attend
Anyone may attend (Default)
IRC channel (Optional)
#design-integration
Other sessions where we should avoid scheduling conflicts (Optional)
#59, #28, #68, #30, #27, #31, #26, #29
Instructions for meeting planners (Optional)
Co-chair if conflict can be resolved. List of conflicts is a prioritized list.
Agenda for the meeting.
color-scheme
values. csswg-drafts#9660@like
rule for repurposing page default styles csswg-drafts#10222Links to calendar
Meeting materials
The text was updated successfully, but these errors were encountered: