-
Notifications
You must be signed in to change notification settings - Fork 396
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
Who uses what? (plugin wise) #3202
Comments
I haven't used adaptors, easings, interpolators |
We use Decorators quite a lot, though I agree that most of their applications could be implemented via Components as well. The main reason we're not doing so, is that Components seem to be more memory intensive. Custom events are nice to have, though I don't see me needing more than a couple. |
I've used custom events a lot, mostly for easy usage of drag & drop (eg. on-filedrag="" to abstract all those obscure dragstart, dragover, dragmove events and so on) or some short-cut keyboard-bindings (e.g. on-keyescape="", on-keyenter="", on-keytab=""). I also heavily rely on decorators. I use them for all kind of things. E.g. add char/line-counters, line numbers, autoresize and other functionality to input fields (in any desired combination). Add tooltips/popovers to all kind of elements. I think, decorators are much more easy to use than a separate component in a lot of cases. Want to add some extra functionality to any existing element? Just add a decorator! I don't use adaptors, easings and interpolators |
I mostly use
I rarely use adaptors, and almost none of the animation stuff (transition, easing, interpolators)
I actually use a few of them:
But yeah, I agree. Generally, they're all dead. Typical open-source.
They're often confused with each other, but they're actually distinct pieces and work in tandem. The plugins page now has an updated description of them. TL;DR: Easing converts linear animation time to "squiggly animation time", Interpolators convert "squiggly animation time" to "squiggly values". Something like const progress = easing(time)
const value = interpolator(startValue, endValue, progress) |
I use all of these things a lot, except Easings/Interpolators. But I think this stuff could be very useful in projects which work with a graphic or something like that. So, seems many people could need it.
I believe that Adaptors is one of the most unique features of Ractive. I think the main part of this feature is a filtering which data need to adapt. So, in theory, you can simulate Adaptors functionality via observers, but I don't think so you want to observe all the data at multiple times. Seems it can lead to big expenses.
Hm, I think Decorators are cheaper than Components in most of the cases.
In my last project, I used this one: https://github.com/ractivejs/ractive-events-keys |
I use components extensively ("everything is a component" approach) and rarely use partials (mostly for yielding inside components). Lately I saw what decorators can do, and now I'm simply (re)writing appropriate parts with decorators. I've never used Easings, Interpolators and Adaptors (and I don't know what they are, actually). Altough I use Events rarely, it's handy when it comes to I'm also looking for a way to improve inter-component communications where we can send/receive events to/from another components directly (by declaring only within the template, like drawing PCB's or function block diagrams). Lately, @evs-chris announced Custom event plugin init args support which makes me feel like it will help very much on this one. |
I don't know your case detailed but you able to do that: playground |
@PaulMaly Template should look something like: Ractive.components.Foo = Ractive.extend({
...
on: {
error: function(ctx, reason){
// do something with the error
}
}
})
new Ractive({
el: 'body',
template: `
<Foo cls="someClass" />
<Baz cls="someClass" />
<Bar cls="anotherClass" on-error="someClass>>coordinateChange" />
<button on-click="anotherId>>dostuff">Fire to Child</button>
`
});
|
I use everything except easings (well, the usual suspects are built-in, but I've not felt the need for custom easings) and adapators. I think I would use adaptors if they were a bit more fleshed out e.g. could handle managing a firebase store. I use partials nigh constantly. Surprisingly, I have used a custom interpolator for colors - that can take say
True, but to be fair, most interpolators, events, easings, and transitions are write-once plugins that basically require no maintenance. Some decorators fall in that category too. @ceremcem you could probably achieve that by setting up a listener on the root instance that tracks components by their |
thanks for all your responses, I found some of them enlightning. I was thinking of making a learning resource for ractive, with demos, recipes, "how to" and such, but haven't come very far, it takes quite some time. |
@evs-chris Thanks for the tip, here is the results |
Just out of curiosity. I have the feeling several plugin parts of Ractive are almost unused by anyone.
Personally, I have the feeling that the most widely used ones are:
Edit: considering the answers, it appears following ones are indeed used pretty much:
While the following ones are left rarely used:
...so I was curious if anyone of you use these at all IRL ...and please don't mention the "plugins" in resources, 90% of them are broken and unmaintained, but that's another topic.
The text was updated successfully, but these errors were encountered: