These are chat archives for ractivejs/ractive

16th
Apr 2018
Anatoli Radulov
@avoto
Apr 16 2018 17:41
Hey there, has any of you dealt with this Radio buttons issue? Basically relating to name attribute (only needed by Ractive in this case) being rendered in the DOM - as name="{{selectedOption}}"
Joseph
@fskreuz
Apr 16 2018 17:43
I vaguely remember an issue related to this one.
Lemme see if I can find it.
Paul Maly
@PaulMaly_twitter
Apr 16 2018 17:46
It’s because of form-tag
Joseph
@fskreuz
Apr 16 2018 17:46
A workaround is to wrap a <form> around each group.
But you probably wouldn't want this if you embed these components inside a larger form.
Joseph
@fskreuz
Apr 16 2018 17:56
Found the relevant issue: ractivejs/ractive#1937
Anatoli Radulov
@avoto
Apr 16 2018 18:11
Great, let me read through the thread and see what was the final solution to this.
Chris Reeves
@evs-chris
Apr 16 2018 18:11
also #3135
the cross-component issue was fixed... I think
are you actually using a form submission?
Anatoli Radulov
@avoto
Apr 16 2018 18:13
Yep (in this case unfortunately)...
Chris Reeves
@evs-chris
Apr 16 2018 18:15
that's unfortunate
Chris Reeves
@evs-chris
Apr 16 2018 18:22
here is an awful decorator hack that should skirt the issue
well, spoke too soon
names still get mangled on update
Anatoli Radulov
@avoto
Apr 16 2018 18:25
Yeah, I had an idea like that too :)
Chris Reeves
@evs-chris
Apr 16 2018 18:27
the hack becomes more awful, but seems to work
I'm still not positive about the best way to solve this long-term
there're a few options to address it, but none of them are an obvious best solution
perhaps the longterm solution is to plugin-ize twoway bindings as special decorators
balancing "batteries included", framework weight, and "yeah, but these are CR2025s and I needed a AA" is tricky
Anatoli Radulov
@avoto
Apr 16 2018 18:31
:)
I really like the idea you've suggested in #3135 - supporting <input name={{.value}} name-value={{@this._guid + 'group'}} .../>
For now, I am going to have to introduce an array with booleans and fall back to the checked attribute.
Paul Maly
@PaulMaly_twitter
Apr 16 2018 19:06
Possible solution: playground
Chris Reeves
@evs-chris
Apr 16 2018 19:09
here's what shook out of shortcircuiting static attributes and doing a bit of profiling around looping in hot code paths: keyed benchmark results
backwards... images apparently take the link second... md...
a 10-20% improvement, depending on how the benchmark machine is feeling
Paul Maly
@PaulMaly_twitter
Apr 16 2018 19:12
cool)
Chris Reeves
@evs-chris
Apr 16 2018 19:13
if the results are consistent, ractive trails svelte in speed by < 10% :smile:
the more complex model handling and vdom still make it comparatively memory heavy
definitely not very svelte
Anatoli Radulov
@avoto
Apr 16 2018 19:32
@PaulMaly_twitter yes, that's more or less what I was planning to do.