You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it easier to define userland "components" #208
At the moment this wouldn't work great with Calico, because modifiers are typeclass-based (#207). Another issue is that if the caller of MyComponent wants to add additional cls values, it would override the cls := "decoration" (#205). It doesn't compose well.
The composition issue in particular bugs me, since it's not just about the class attribute but basically any attribute. It's too easy to mess up the "component"'s internals when doing things externally.
Hence why I say "component", because it's not really well encapsulated. I feel like the answer might be #37: that we should make it easy to define true Web Components, that have proper encapsulation of their internals. Web Components specifically solves this issue of encapsulation.
def MyComponent(mods: Mod[HtmlElement]*) =
div(
cls := "decoration",
mods
)
At the moment this wouldn't work great with Calico, because modifiers are typeclass-based (#207). Another issue is that if the caller of MyComponent wants to add additional cls values, it would override the cls := "decoration" (#205). It doesn't compose well.
The composition issue in particular bugs me, since it's not just about the class attribute but basically any attribute. It's too easy to mess up the "component"'s internals when doing things externally.
Hence why I say "component", because it's not really well encapsulated. I feel like the answer might be #37: that we should make it easy to define true Web Components, that have proper encapsulation of their internals. Web Components specifically solves this issue of encapsulation.
Hi Arman, I can understand the problem, the user-defined Attribute values like cls are overwritten by the existing one. I can fix this, Can you assign this issue to me ?
@JoeCelaster thanks for your interest! I think this is a difficult issue to get started with. Instead, can I suggest you make a contribution to the Calico Material web component library?
@JoeCelaster thanks for your interest! I think this is a difficult issue to get started with. Instead, can I suggest you make a contribution to the Calico Material web component library?
I am actually contributing to take part in GSOC, which is the right repo to contribute ?
I am actually contributing to take part in GSOC, which is the right repo to contribute ?
@JoeCelaster excellent! Adding a web component to the Calico Material library will be a good first contribution, to help you get started with the GSoC project :)
I am actually contributing to take part in GSOC, which is the right repo to contribute ?
@JoeCelaster excellent! Adding a web component to the Calico Material library will be a good first contribution, to help you get started with the GSoC project :)
Thanks for that @armanbilge , But i can't find any issues there and pull requests. How can i contribute to it ?
Activity
JoeCelaster commentedon Mar 4, 2025
Hi Arman, I can understand the problem, the user-defined Attribute values like cls are overwritten by the existing one. I can fix this, Can you assign this issue to me ?
armanbilge commentedon Mar 4, 2025
@JoeCelaster thanks for your interest! I think this is a difficult issue to get started with. Instead, can I suggest you make a contribution to the Calico Material web component library?
JoeCelaster commentedon Mar 4, 2025
I am actually contributing to take part in GSOC, which is the right repo to contribute ?
armanbilge commentedon Mar 4, 2025
@JoeCelaster excellent! Adding a web component to the Calico Material library will be a good first contribution, to help you get started with the GSoC project :)
JoeCelaster commentedon Mar 5, 2025
Thanks for that @armanbilge , But i can't find any issues there and pull requests. How can i contribute to it ?