These are chat archives for ractivejs/ractive

31st
May 2017
Bob Schellink
@sabob
May 31 2017 06:55
Back to my playground comment, when running code in the playground for the first time there is also a noticeable delay while the selected Ractive version is downloaded. Again a loading indicator could help or preload immediately when the Ractive version is changed under settings tab?
Chris Reeves
@evs-chris
May 31 2017 09:19
the playground will now preload with the page
there's not a whole lot to be done about changing versions, though we need to switch the playground version selector to jsdelivr as it's my understanding that it's faster
regarding #1911 and the bin component parser, how about allowing a $META substitution that could be set as __meta: $META that error code could check for when generating a message
Chris Reeves
@evs-chris
May 31 2017 09:24
the $META would just be something like { file: 'Component.html' } initially
I'm not really sure what else would go there by default
James Green
@jmkgreen
May 31 2017 09:56
Just installed 0.9.0 via npm - the distributed typings for it was last updated for 0.7.1..? Should I be concerned?
Joseph
@fskreuz
May 31 2017 12:08
@jmkgreen There's an open issue for that ractivejs/ractive#2969
oh, you're already on that thread. :D
James Green
@jmkgreen
May 31 2017 12:10
and it's not clear who might be intending to do what with it...
Joseph
@fskreuz
May 31 2017 13:49
Yep. Unless someone knows TS best practices by heart, anyone could do it but will require a bit of homework and therefore time.
James Green
@jmkgreen
May 31 2017 14:20
So there's no cause for Ractive itself to be re-written in TS? Looks like a common way forward for many projects and has the side-effect of providing definitions for client developers such as myself.
Joseph
@fskreuz
May 31 2017 14:25
Personally, it's worth exploring, but it's not an immediate need.
Also Ractive doesn't need to ride the hype train. :train: :train: :train: :train:
James Green
@jmkgreen
May 31 2017 14:36
No, but I do have a concern that I'm programming client code to old interfaces, hence why I'm here to express that.
As ever, not suggesting I'm the right person to address it, but I can add my +1
Joseph
@fskreuz
May 31 2017 14:38
Sure! Any form of contribution, even a half-done PR, is always welcome. :D
There will always be people to help out. :thumbsup:
Mark Powell
@mpowell-atomic
May 31 2017 17:39
Here's a webpack loader for components that uses rcu & rcu-builders and doesn't die on the .mjs ractive version:
const Ractive = require('ractive');
const rcu = require('rcu');
const { es6 } = require('rcu-builders');

rcu.init(Ractive);

module.exports = function(source) {
  const definition = rcu.parse(source);
  return es6(definition, {
    preserveExtensions: true,
    sourceMap: true
  }).code;
};
Joseph
@fskreuz
May 31 2017 17:40
Use "fenced code" for code blocks, and the fences should be on their own lines. :D
And oooh, rcu and rcu-builders in action. :thumbsup:
Chris Reeves
@evs-chris
May 31 2017 17:41
don't think I've encountered rcu-builders yet
Joseph
@fskreuz
May 31 2017 17:42
haven't used it either, but readme says it emits es6, amd, and cjs of components for you. :D
Chris Reeves
@evs-chris
May 31 2017 17:45
just curious if anyone has any opinions on the bin component format?
it's pretty much freeform, which means you can't automatically target es6, amd, cjs, umd at the same time
you can target es6 and use a more appropriate tool to get amd, cjs, umd though
Joseph
@fskreuz
May 31 2017 17:46
I'm with that too. We just to the component -> es, then let something else handle it from there to iife, cjs, amd, or es6, like rollup or webpack. ES6 is easier for bundling, imo. It's official syntax too.
Chris Reeves
@evs-chris
May 31 2017 17:48
yep
technically you can target whatever you want, as it mostly just does a string sub on the js to fill in the various non-js bits
but es6 fits the best to me
Mark Powell
@mpowell-atomic
May 31 2017 17:49
yeah es6 good for me too. is there documentation on the bin component stuff somewhere?
Joseph
@fskreuz
May 31 2017 17:50
ractive --help :D
Chris Reeves
@evs-chris
May 31 2017 17:50
not sufficiently yet... just the help
Joseph
@fskreuz
May 31 2017 17:50
ractive --halp!!! :laughing:
Mark Powell
@mpowell-atomic
May 31 2017 17:50
:smile:
Chris Reeves
@evs-chris
May 31 2017 17:51
I'm going to publish rollup and webpack plugins that use the bin within a week or so
:laughing:
Mark Powell
@mpowell-atomic
May 31 2017 17:51
nice! thanks!
Chris Reeves
@evs-chris
May 31 2017 20:55
in looking at #2986, should we try to prefix all of the styles automatically?
I feel like that was important before the era of evergreen, but at this point, prefixed styles are probably not going to behave correctly
Joseph
@fskreuz
May 31 2017 20:57
isn't prefixing bad practice these days?
and should be left to tools if needed?
Chris Reeves
@evs-chris
May 31 2017 20:58
well, technically we're the tool here :wink:
Joseph
@fskreuz
May 31 2017 20:58
oh snap :D
Chris Reeves
@evs-chris
May 31 2017 20:58
I'm not sure about bad practice, but I generally don't
it looks like the only common transition property that would need to be prefixed is transform
most of the other stuff recommended for prefixing is future layout stuff - flexbox, grid, and some stuff I've never heard of
Chris Reeves
@evs-chris
May 31 2017 21:05
there's a bit of cruftiness that's going to multiply in the transition code if I leave auto-prefixing in place
I figure special-case transform and ignore the rest?
Joseph
@fskreuz
May 31 2017 21:06
Hmm...
Chris Reeves
@evs-chris
May 31 2017 21:06
none of the auto-prefixing happens for regular style directives
Joseph
@fskreuz
May 31 2017 21:08
How do other frameworks handle this? Haven't seen how the latest and greatest frameworks handle this.
Chris Reeves
@evs-chris
May 31 2017 21:08
seems like most transitions mess with opacity, colors, positioning, and transforms
I'm really not sure :smile:
vue seems to leave it entirely to the transition author
its transitions seem to be mostly class-toggle-based
Joseph
@fskreuz
May 31 2017 21:12
yep, was thinking of the same thing. we can be like "for maximum support, use css or get the hell out" :trollface:
(of course we can't do that) :D
Chris Reeves
@evs-chris
May 31 2017 21:13
are there still holdouts on ff 3.5?
Joseph
@fskreuz
May 31 2017 21:14
(urgh, gitter doesn't support time-specific youtube previews)
https://www.youtube.com/watch?v=TBwW2vTKVy4&feature=youtu.be&t=1002
FF3.5... Hmm...
Nope. Not here. We follow latest 2 versions rule, IE11 and occasionally 10. :D
Chris Reeves
@evs-chris
May 31 2017 21:17
ie9 has a somewhat surprising range of css support
Joseph
@fskreuz
May 31 2017 21:17
Maybe except flexbox, iirc. :D
Chris Reeves
@evs-chris
May 31 2017 21:17
yeah, no very modern stuff
Joseph
@fskreuz
May 31 2017 21:17
but yeah, IE9 was good when it was released.
Chris Reeves
@evs-chris
May 31 2017 21:17
although flexbox is getting to be not so very modern
beat the crap out of ie8, bless 'im
eesh
global ie8 @ 0.34%, ie9 @ 0.2%