These are chat archives for ractivejs/ractive

4th
Jan 2018
Paul Maly
@PaulMaly_twitter
Jan 04 2018 11:18
Hi! Can we somehow update data value without triggering notification about it? Like silent mode.
kouts
@kouts
Jan 04 2018 13:51
Good question @PaulMaly_twitter , I wonder how other frameworks are dealing with this
Joseph
@fskreuz
Jan 04 2018 13:51
If you mean ractive.observe(), it returns an object with a silence method which you can call to silence that observer. https://ractive.js.org/api/#ractiveobserve . Otherwise, can you explain what a "notification" is?
Paul Maly
@PaulMaly_twitter
Jan 04 2018 14:07
No, I mean, I need to no one knows that it's happened.
Joseph
@fskreuz
Jan 04 2018 14:12
What's the use case?
Cerem Cem ASLAN
@ceremcem
Jan 04 2018 14:21
@fskreuz actually the same need is still valid for me too, I think there must be a this.set(..., {silent: true})
@PaulMaly_twitter like this one, right: ractivejs/ractive#2999
Paul Maly
@PaulMaly_twitter
Jan 04 2018 14:22
It's an object
Yep, silent: true is ok
@fskreuz it's an object which able to mutate itself but I need to get that it was changed only once. On full reset: ractive.set('obj', {});
Paul Maly
@PaulMaly_twitter
Jan 04 2018 14:28
But then only prop changed I don't need to know about it: ractive.set('obj.prop', 'foo')
For example in observers and related computed props
Paul Maly
@PaulMaly_twitter
Jan 04 2018 14:33
I think thats would be great:
ractive.set('obj', {});
And
ractive.set('obj.prop', 'bar', {silent: true});
kouts
@kouts
Jan 04 2018 14:35
I had the same need when trying to make a decorator of a jQuery mask plugin if I recall correctly.
Chris Reeves
@evs-chris
Jan 04 2018 15:27
the easiest way would be to modify the object outside of ractive e.g. r.get('obj').prop = 'bar'
Paul Maly
@PaulMaly_twitter
Jan 04 2018 15:32
Hm, ok I'll try this way. Thanks Chris!
Joseph
@fskreuz
Jan 04 2018 18:53
Any comments on the implementation of ractivejs/ractive#3170 ? I read yarn has workspaces/workgroups/whatever they're called - built-in monorepo management. Wondering if yarn is worth exploring.
There's also a minor change in the way component files are written. See component.ractive.htmls in the test specs of the utils-component commit. Wondering if we should start considering updating how component files are written.
Chris Reeves
@evs-chris
Jan 04 2018 18:56
I haven't quite had time to go through the chewy bits
Joseph
@fskreuz
Jan 04 2018 18:59
:thumbsup:
yeah, the bulk of every commit is just a battery of unit tests.