Open PEM-- opened 9 years ago
Hmmm.... I think that with jspm we could go around meteor's build phase (with a specified option) and serve meteor-agnostic libraries that. There could be an option configurable per library to either 1) build the Meteor way, serve dynamically, or build the jspm way. It might be tricky, but I think it can be done, and makes a ton of sense to be able to do it with meteor-agnostic libraries like famous, bootstrap, etc.
Yes but, that's my point. I don't want to go around meteor's build phase, I think it's really good :> Also, I don't think jspm would solve this particular problem either. If they include famous-views, all the famous stuff we use will be bought down. We can't pull down the stuff "as needed" in run time, because this would wreak havoc with template rendering. The alternative is to have the dev specifically request each view they want in javascript somewhere... this would work with jspm and with famono, but is a bit less dev friendly. It's something I've considered before... it makes great sense with famono but it just totally unnecessary and a lot of extra work for mjn:famous.
If they include famous-views
famous-views wouldn't be loaded with jspm, because famous-views is meant specifically for Meteor (i.e. famous-views isn't Meteor-agnostic, it is Meter-dependent). Famous-views, or any other library that wants famous, can specify how to get famous, and whatever other 3rd party meteor-agnostic libraries that re needed. I've gotta learn more about Meteor packaging though...
It just doesn't make sense to have to wrap every single 3rd-party meteor-agnostic library for your project into it's own Meteor package. It'd be horrible. Imagine big projects migrating to Meteor with hundreds of meteor-agnostic dependencies.
Hope I was clear. With famono, Meteor bundles/minifies only the parts of famo.us that the developer (and in this case, also famous-views) uses. Isn't that the same as jspm without any extra work? :) Famono (despite the name) actually doesn't contain Famous, and works with bower/github repos. But instead of needing to use require('famous.core.Engine')
, we just write famous.core.Engine
and famono knows to bundle it (and not bundle things we don't use). It's really quite brilliant. Hats off to @raix.
But yes, I wouldn't bundle general libraries in Meteor just for the sake of it. https://github.com/meteor/meteor/issues/3107
You guys are doing a tremendous work! I'm really impressed, well done!
Have a nice and very productive day!
P.S. ...I can't wait to test fview-map ;-)
@splendido Thanks to @gadicc for starting this amazing work! :tophat: off.
@gadicc Funny, I saw that issue. :D
With famono, Meteor bundles/minifies only the parts of famo.us that the developer (and in this case, also famous-views) uses. Isn't that the same as jspm without any extra work?
I get what you mean. But as you mentioned, @raix had to make a Meteor package just for the purpose including famous in Meteor projects, without adding Meteor-specific functionality. It's not ideal (though it's a job well done!). What you've said Meteor does is indeed very niiiiiice. :D Personally, I wouldn't mind having packages built in two places, as long as it's clean: meteor-specific packages, and any other libraries. But yeah, there's should indeed be some type of solution to this as mentioned in https://github.com/meteor/meteor/issues/3107.
@splendido Yeah, the fview-map is going to be super useful. There are currently some issue on the Google maps integration with Famo.us. I think I will restrict usage to Leaflet at the beginning. I'll do it just after the FlexGrid which is quite awesome and almost done (it's missing insertion and removal animations).
:+1:
Great work with all the plug-ins. I'm testing a package that uses famous-infinitescroll (https://github.com/JonnyBGod/famous-infinitescroll).
The View renders and accepts properties:
{{#InfiniteScrollview size="[undefined, undefined]" offset=1000}}
{{#Surface size='[undefined, 100]'}}Test #1 {{/Surface}}
...
{{/InfiniteScrollview}}
There is one problem though. InfiniteScrollview uses the getAbsolutePosition()
method. It returns the total progress through the Scrollview distance in pixels. This is used to emit an event.
Apparently this method was introduced on famo.us 0.3.0, but raix:famono
and mjnetworks:famous
use famo.us 0.2.x.
@Wenape Use mjn:famous :wink: For raix:famono, just modify your lib/smart.require
so that it points to the latests famo.us's release.
Here's the content of lib/smart.require
that will point your project to the appropriate release of famo.us:
{
"famous": {
"git": "https://github.com/Famous/famous.git",
"branch": "v0.3.1",
"root": "src"
},
"famous.polyfills": {
"git": "https://github.com/Famous/polyfills.git"
}
}
For thus who would like to create a plugin, we have started a contribution guide. It gives some hints on how to set up a plugin project. More hints will be added: https://github.com/gadicc/meteor-famous-views/blob/master/CONTRIBUTING.md
@PEM-- Thanks it's working now. I'll check out the guide and publish the package.
Just finished the InfiniteScrollview plugin. Here's a demo: http://infinitescroll.meteor.com
@Wenape :+1:
Yeah. Nice one. I love the way you put it. Very clean. Very Ionic look alike.
At the pace of the plugins are coming, it's going to be a mandatory one :wink:
Ionic is actually pretty useful for fast prototyping. It would be really great to have some Spacebars helpers that would pick the right icons for you (iOS, Android). Probably would get this device-info from a cordova plugin.
Sounds easy, you can use the device plugin (the same one that you use for checking when to launch your app after the loading screen). I provides info on the device you are running one (hardware, software). Useful for triggering specific behavior.
@Wenape, awesome! Just added this to the plugin page. I wonder can we retrieve more data when the user gets approaches the end, instead of reaches the end? That would be very cool.
And yes, with your help, I hope this project/community will develop into something akin to ionic for Meteor+Famous (with fluid transitional animations, etc). Starting with fview-infinitescrollview using the correct icons per OS. Thanks for volunteering to figure out the best pattern for us to do this :grin:
@gadicc Thanks for including the plugin! You can actually retrieve more data as the user approaches the end. The scroller does this by looking at the offset
attribute on the template. The thing is, I used a small offset for the demo (400px). You could use > 1000 making the callback run earlier + providing a larger ammout of data on each callback. This way you could scroll really fast without ever reaching the "bottom" of the viewport.
I guess I set it a little lower on the demo so users would see they can still get some styling/animation feedback, specially for users who scroll pushing the limits.
The FlexGrid is available: .
Awesome work PEM!
Saweeeeeeeeeeeet.
@Wenape, great stuff! Just saw that all now in the README, sorry if it was there before :> I think what would be also great is an example using a reactive cursor and upping a limit in a Session var in the callback, used for both the query and the subscription. Hope I explained that well but pretty sure you know what I mean. famous-views is attracting more and more novice users, who would be eager for this kind of feature but wouldn't be able to write it themselves.
@PEM--, great work as usual! This is another cool "wow" demo that people will love, the animated gif is a great help, and I guess the fact that it's not on the plugin page yet means you have something exciting for us there too :) Note that in commit https://github.com/gadicc/meteor-famous-views/commit/46adf40926dc61ef36cc98d1962bdd6b39c7d731 I just totally changed how plugin info is stored. It's easier to add templates for individual plugins (auto detected) and paves the way to storing this info in a database in the future.
Thanks mates. Nothing fancy and @gadicc almost does it completly for me. I've also put a video on Youtube, it will be far more easier to show animated content (I fear that putting too much contexts on the plugin page is going to makes it unresponsive). I will update the page like we did it for the fview-slidedeck plugin.
@PEM-- is very modest :> I contributed exactly 2 lines to this (and ok, a little time bug hunting :)).
@gadicc You're probably right. New people would likely start with using cursors as a data source for the scroller. Just added a second example for this case.
My man! Good job!
Hi everyone, I just wanted to leave a note here thanking you for all the hard work that is going on with this package. @gadicc especially thank you for creating this package. @PEM for all your contributions and everyone else contributing!
A few months ago I learnt famo.us and am just getting ready to submit a famo.us built app to the app stores for my client. Then a couple months ago I began learning meteor which for what it does, I found to be as amazing as famo.us Naturally the two should be used together. I saw the famous-views package a while back but first wanted to learn how to integrate vanilla famous with meteor. It was tricky as there is so little documentation and samples. Still the Famono package was great to use. In the mean time Ive been keeping an eye on the progress for the famous-views package, reading the bombardment of messages for this package in my inbox daily (thats a good thing!) Now Im ready to integrate famo.us the meteor way ;) Hopefully I will be able to help out one way or another. Thanks again!
Haha. Thanks for the feedback! Good luck with your transition, and definitely, contributions in the future would be great! Until then, insight on the transition from vanilla famo.us to famous-views is especially welcome, as is pointing out anythings in the docs or API which could be clearer.
@PEM-- @gadicc Hey guys, I just finished the first version of my PushMenuLayout component. I'd like to get it into famous-views now. :D Try it here: http://trusktr.io, just hover on the left of the screen, or drag it (push it) to open it on a touch device.
The PushMenuLayout is part of my overall component library: g.trusktr.io/trusktr/infamous ("infamous" is not set in stone yet, but I needed a name for the repo on my gitlab), so to make my PushMenuLayout work with fviews I'll also need to make the smaller building blocks work too, like my Molecule and Plane components (names subject to change). The Calendar component is work-in-progress, and uses a Grid component internally (this flip animation is the WIP Calendar component, but it doesn't look like a calendar yet xD). It's not a flex grid like @IjzerenHein's awesome FlexGrid though.
@ARaouf What's the app called?
@trusktr Indeed, the calendar is definitely going to be Wow effect but... clicking on date is going to be a problem :wink: For the moment (calendar reference...), you're the first on the line.
I love the menu. Rhoooo, nice :cat:
PS: Nice move for Gitlab. I've seen that you were using ES6, nice move too.
@PEM-- Thaankz! :D
Indeed, another problem is importing my components since they are ES6 (which is why I'm thinking JSPM). I've seen some es6 packages for Meteor, but none of them handle import/export, just the other language features. JSPM can precompile my files to CommonJS format for example.
That's why I prefer CS :wink: You got the classes, the fat arrow, the destructuring assignments... Just joking.
Well, Meteor's way to export variables differs from AMD, CommonJS, ES6 modules. All scripts are loaded at the beginning of the app. For exposing a variable in the global scope, you just remove the var
. This is why you don't see module.exports
, require
, define
, export
or import
. It is already loaded. This is also why you don't see any import
/ export
in the packages developed in ES6.
@ARaouf Yeah! Bravo to the app in famo.us. Like @trusktr, I would love to see that (if you're allowed by your client). I'm sure that with your solid knowledge of mobile and famo.us, your contributions would be enlightening.
@PEM-- I saw that, but I wouldn't want to modify my library just to follow Meteor's standard. I want my lib to be Meteor-agnostic, in support of the impending release of ES6. :D
I think Meteor-agnostic is fine, this is exactly what's happening now with the attempt for Official Meteor integration directly from 3rd party libraries. Unfortunately I don't have any ES6 answers, I haven't touched it yet :( I see what you're saying about jspm handling all this... but if jspm can do it, I'm sure we can do it too :> (either through a ES6 polyfill package, or through "global" defines scoped to the package).
PushMenuPlugin would be awesome! Besides looking super smooth, this is one of the essential building blocks in making an app that I think would be well appreciated by the community. With our amazing growth recently, we are getting a lot of new users who don't want to or can't build their own components, and are eager to adopt famo.us as soon as it's quick & easy to put something together with prebuilt plugins. And menu is usually one of the first thing an app needs :)
The calendar is going to looking super wow when it's done :)
@gadicc sorry about spamming your issue, I'll remove it later :)
@trusktr jspm in the package.json can fairly easily be converted into a meteor isopack in https://github.com/raix/Meteor-include - We need to use the constraint resolver in the package system.
IMHO: That said I personally dont think ES6 imports solves anything in Meteor. jspm is just another bower/jam/browserify/etc. using require/define/amd/umd etc. are all same but different - I would like 100% agnostic library code without require etc.
I would like to see more shared code via finegrained dependencies, across any sources - where jquery/lodash/underscore etc. all depended on the same finegrained dependencies. But thats not the js world today.
@trusktr Looks cool :+1:
@raix, please don't remove, your insight is always welcome here :)
@raix @gadicc Thanks :)
Yeah, I can imagine once Famo.us gets more adopted people putting cool things together with all the pre-made components. :D
Hi there!
I just finished a first version of BoxLayout component you can find it here https://github.com/oorabona/fview-boxlayout.
Another nice addition to our little ecosystem :+1: A very handy one. Thanks @oorabona!
@oorabona, I've added your plugin to our little but growing list of plugins. It's deployed. Tell me if it suits you.
@PEM-- : Awesome! Happy to contribute :+1:
Would it be possible to have a direct link to the demo webpage from the plugins page? That would be nice to be able to see it in action before digging code :wink:
Indeed, very nice idea. I will add a demo link each time one is provided. Nice :smile:
Hop, done and deploy!
Very cool idea @oorabona, I've created a little demo for the DotLoader
: fview-dotloader
I've added a set of new demo:
Famo.us community has created some nice components that could be integrated with Meteor delivering high reusability. We could set up plugins to ease their integration and create a page on the famous-views site for inventory and demo.
Plugins would be named with
fview-BLABLABLA
.From @IjzerenHein
https://github.com/IjzerenHein/famous-boxlayout(@oorabona, 29nov14)https://github.com/IjzerenHein/famous-bkimagesurface(@PEM--, 13nov14)https://github.com/IjzerenHein/famous-kenburnscontainer(@gadicc, 13nov14)https://github.com/IjzerenHein/famous-lagometer(@gadicc, 12nov14)On Codepen.io:
Flexgrid: http://codepen.io/befamous/pen/IihwL?editors=001(@PEM, 25nov14)From @naman34
From @JonnyBGod
https://github.com/JonnyBGod/famous-infinitescroll(@Wanape, 23nov14)Other fine ressources from Famousco.de:
A simple loader : http://famousco.de/2014/07/animated-dots-icon/(@PEM--, 14nov14)An animated hamburger menu: http://famousco.de/2014/07/material-designish-button-animation/(@PEM--, 13nov14)From @PEM--:
A device plugin: Choose your device (iPhone, iPad or MacBook) and put your surfaces within (@PEM--, 16nov14, 2pts).fview-slidedeck: An helper package to create slides.(@PEM--, 15nov14, collaboration with @gadicc)From @mcbain :
#Animate plugin(@mcbain, 19nov14))Score: