These are chat archives for ractivejs/ractive

8th
Nov 2017
Joseph
@fskreuz
Nov 08 2017 02:09
@ceremcem yup. that was one of the reasons why the docs moved to .js.org, aside from the revamp and retooling and the free JS-themed domain that every other shiny JS tool uses.
The top search result for "ractive" and "ractivejs" in Google is now the .js.org version and not the older ractivejs.org, so I'm not that worried.
Joseph
@fskreuz
Nov 08 2017 02:19
Plus it's not like we lost the resources of the old sites. v0.x is still there for 0.8 and older and still has the old look and feel https://ractive.js.org/v0.x/0.8/get-started
Chris Reeves
@evs-chris
Nov 08 2017 02:21
I think the error and warning message urls are even moved over for the latest edge and 0.9 releases 😁
Joseph
@fskreuz
Nov 08 2017 02:21
:+1:
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 08:49
okay then...
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 11:52
do you think splitting a component into parts make sense when we use it in the template? for example, consider this example. If we wanted to place different pieces of the component into different locations in the template, we have no chance to do so. It's just the opposite of partial usage with the components.
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 11:58
basic usage is: design a component, place its parts into different locations freely. in the above example, if we wanted to refactor the UI to display width, height and area in a table, we have to edit the component to add table columns (<td>...</td>) but actual table tag should stay in the parent, which looks weird
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 12:26
(thinking twice, it doesn't make sense to me for the above example, although it seemed a brilliant idea in my actual application)
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 12:33
(the same goal can be achieved by moving everything but the area computed out of the component, like this)
Joseph
@fskreuz
Nov 08 2017 14:27
For anyone interested in documenting recursive rendering and data, here's a "good first issue" kind of issue ractivejs/ractivejs.github.io#123 :grin:
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 14:56
:smile:
Joseph
@fskreuz
Nov 08 2017 17:43
Also, thoughts on this approach to modularizing Ractive? ractivejs/ractive#3129 Not happening anytime soon, just curious.
Chris Reeves
@evs-chris
Nov 08 2017 18:45
There are definitely some things that could be turned into internal plugins, like special bindings for elements, transition helpers, observers, and the adaptor plumbing.
Joseph
@fskreuz
Nov 08 2017 19:33
It's like an instance only carries config, structure and model info. Everything that works on that data/config becomes something you optionally import.
Treading dangerously close to functional territory (data tree + renderer = UI, data + function = new tree). :grin:
Cerem Cem ASLAN
@ceremcem
Nov 08 2017 20:00
well, I'm happy with the current bundle, there is no reason to wrestle with the size
kouts
@kouts
Nov 08 2017 20:04
comparing to other mvvm libs, Ractive is big in size, on the other hand it has many many features. It would be great if some features were plugins but I have really no idea if this is feasible.
Joseph
@fskreuz
Nov 08 2017 20:08
Neither do I, hence the question. :grin:
Chris Reeves
@evs-chris
Nov 08 2017 20:15
not super easy, but possible
kouts
@kouts
Nov 08 2017 20:20
Async components (which I haven't had the time to play with yet) are a great addition, the next big thing would be an Official Router ™ that will bind the whole thing together.
Larry Osborn
@larryosborn
Nov 08 2017 23:07
Hey, I have this strange problem using a class in a template… should this work? https://jsfiddle.net/larryosborn/2ehwg7ns/
Chris Reeves
@evs-chris
Nov 08 2017 23:30
It should. It looks like maybe it's running afoul of this checks for binding.
but maybe not...
Chris Reeves
@evs-chris
Nov 08 2017 23:56
nope, that's it
classes are implemented in a slightly strange and sugary way, and static properties apparently don't like it when the constructor is bound
any functions at the data root are automatically bound to the instance, so if you put the classes in a nested data object, they are left alone: https://jsfiddle.net/2ehwg7ns/1/