-
Notifications
You must be signed in to change notification settings - Fork 10
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
Move makeup-web-components packages into makeup-js. Archive makeup-web-components project. #168
Comments
I'd almost suggest just archiving it and not moving; at least for now. Architecturally, it may not fit well with our desired approach to use progressive enhancement. We won't be using shadow DOM (at least in the first version) nor the style/templating. Not sure about the |
By the way, quick proof of concept using the <makeup-switch control="switch__control">
<span class="switch">
<span
class="switch__control"
role="switch"
tabindex="0"
aria-checked="false"
aria-labelledby="label-1"
></span>
<span class="switch__button"></span>
</span>
<span id="label-1">Enabled Switch</span>
</makeup-switch> Note that the redundant 💀 Bones styled by 😎 Skin, powered by 💄 Makeup with accessibility in 🧠 MIND. That said (and for the record): I'm super down for DSD (declarative shadow DOM), eventually. That would be an awesome feature that I think could build upon this. It would just require a lot of extra thought about how we'd leverage it (particularly with regard to templating, reactivity and if that template is then optional and etc). IMHO, that could take the form of Bones itself getting components, e.g. <bones-switch label="Enabled Switch" checked="false">
<!-- Optional (implicit if omitted). -->
<template shadowrootmode="open">
<makeup-switch control="switch__control">
<link rel="stylesheet" href="path/to/ebay/skin.css" type="text/css">
<span class="switch">
<span
class="switch__control"
role="switch"
tabindex="0"
aria-checked="false"
aria-labelledby="label-1"
></span>
<span class="switch__button"></span>
</span>
<span id="label-1">Enabled Switch</span>
</makeup-switch>
</template>
</bones-switch> ... but I've digressed bigtime on that one. |
Yeah, Also, just for comparison (for anybody following along) here is what we currently have: SSR (declarative shadow root)
Pure CSR
I'll try and quickly build one more in this manner in the existing web-components repo, just so I get a better feel for shadow root vs lightdom. |
If you do, you might appreciate
It has a bunch of Aria properties on it. It’s also good for form validation (since forms and fields are still fully veiled by the shadow boundary). |
@patricknelson Going back to this comment: #168 (comment) Would that approach mean no support for CSR scenario? Such as this:
|
Hey, sorry for the late reply. Conceptually, that second code sample provided (the one with In quick hack code (just to speed things up a bit) <!-- Can itself be in a shadow DOM or in the light DOM, it is adjacent (and
therefore accessible) to the <makeup-switch> element -->
<span id="foo">foo</span>
<makeup-switch labelledby="foo" skeleton="true"
<!-- Can build light or shadow DOM inside, and if in shadow, leverage element internals -->
</makeup-switch> And if |
Also to clarify that a bit more:
|
Sorry I wasn't clear, I was referring to this: https://github.com/makeup/makeup-web-components/blob/master/docs/makeup-switch-element/index.html#L72 For fully CSR SPA case (i.e. developer not needing to care about progressive enhancement), everything locked away as much as possible. No exposed template or slots. Although yes, switch is a very simple widget, so it can easily be this way. |
No description provided.
The text was updated successfully, but these errors were encountered: