@aral nice! this is what I would've expected to be able to do given a prop that's called slot
Notices by Andrew Chou (andrew_chou@toot.cafe)
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 28-Mar-2023 00:38:44 JST Andrew Chou -
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 23:40:31 JST Andrew Chou @aral makes sense and very reasonable :)
like the idea of the layout templates 👍
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 22:59:54 JST Andrew Chou @aral maybe that's the intention though, in which case the naming is a little misleading if you're familiar with web component slots 😄
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 22:59:53 JST Andrew Chou @aral sorry I keep adding to this but got me curious 🧐
Svelte handles this in an interesting way with `$$slots`:
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 22:59:53 JST Andrew Chou @aral I guess the naming isn't misleading if you're okay with only using unnamed slots. May be fine for most people's use cases but using the functional prop pattern to represent the slot here makes me wonder if/how you can support named slots i.e. magically getting a prop that represents a named slot (to me, seems like you can't)
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 22:48:23 JST Andrew Chou @aral based on https://codeberg.org/kitten/app/commit/81c940efee40fffd879ed4a4eae03066a31db849#diff-56d1ec8320bc48517d813eea4672e34953e5408c , it really is the "children" pattern just renamed! 😄
-
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 22:48:23 JST Andrew Chou @aral maybe I'm missing something but this looks more like a generic "children" pattern (e.g. how React works) than a "standard" slot 🤔. For example, are named slots supported?
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots
In conversation from toot.cafe permalink -
Andrew Chou (andrew_chou@toot.cafe)'s status on Tuesday, 21-Mar-2023 05:35:45 JST Andrew Chou @aral do you have a writeup for how you've set things up with @fedi? think it's a great experience from a viewer's perspective and if I went the Owncast route, would consider something similar :)
In conversation from toot.cafe permalink -
Andrew Chou (andrew_chou@toot.cafe)'s status on Sunday, 19-Mar-2023 21:54:43 JST Andrew Chou @gwil yes, casual suggesting of breaking changes is the only way I know how to contribute 😂
In conversation from toot.cafe permalink -
Andrew Chou (andrew_chou@toot.cafe)'s status on Sunday, 19-Mar-2023 06:26:58 JST Andrew Chou @aral glad it didn't seem like too much work to actually implement! mostly suggested as a means to have you maintain fewer things 😄
In conversation from toot.cafe permalink