Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ovidiu Cherecheș
    @skidding
    thanks. worked a bit for the last weeks to make it as simple as possible to use
    Sergey Lapin
    @sergey-lapin
    I played with flux a little bit, it is really cool especially that you can just replay events to get state of app, maybe it can be useful for cosmos in some way?
    For some sequence of events -> render component -> maybe compare with previous component snapshot
    Sergey Lapin
    @sergey-lapin
    @skidding
    Ovidiu Cherecheș
    @skidding
    going back and forth through variations of component snapshots does sound cool indeed. this way you could also test transitions between one state and another
    Sergey Lapin
    @sergey-lapin
    Yep
    React render is pretty fast so no need to even store snapshot
    Ovidiu Cherecheș
    @skidding
    and getting a flux + cosmos setup is something I want to try out pretty bad, but I didn't get the change to get fully immersed in any flux implementation so far...
    which flux lib are you using?
    Sergey Lapin
    @sergey-lapin
    Actually I don’t use any just holding conception, flux is pretty simple. I may say I wrote my own lib)
    I just dealt with a lot of frp code based on kefir.js so I intergrated them
    Sergey Lapin
    @sergey-lapin
    I just thought.. how long it would be to go through all commit history of some repo and render all components. where allTime = nComponents * nCommits. If it is not really slow I’d would like to use it)
    Ovidiu Cherecheș
    @skidding
    thanks for the flux link
    how would you capture all those component outputs?
    Sergey Lapin
    @sergey-lapin
    With some worker process I guess and store it outside of repo
    Ovidiu Cherecheș
    @skidding
    you could take a screenshot of each and store them on the drive to open later
    Sergey Lapin
    @sergey-lapin
    manually?
    Ovidiu Cherecheș
    @skidding
    no no
    we use this at work for example: https://github.com/Huddle/PhantomCSS
    but I'm sure there are more ways to take a screenshot of a webpack programatically
    s/webpack/webpage
    :)
    Sergey Lapin
    @sergey-lapin
    s/webpack/webpage ?
    Ovidiu Cherecheș
    @skidding
    I meant webpack and wrote webpack :))
    webpage, dammit
    it's like I have autocomplete. wrote webpack a lot these days
    Sergey Lapin
    @sergey-lapin
    https://github.com/Huddle/PhantomCSS - it is post analize stuff first you need to grab all needed data - snapshots and their meta
    what is webpage?
    Ovidiu Cherecheș
    @skidding
    a web page, just a URL you can open in a browser
    Sergey Lapin
    @sergey-lapin
    hah
    Ovidiu Cherecheș
    @skidding
    anyway, this is why ComponentPlayground has a "full screen" button, so you can take a screenshot programmatically of a component in a given state/snapshot
    Sergey Lapin
    @sergey-lapin
    in js u never know whenever new fancy framework appears)
    webpage.js
    Ovidiu Cherecheș
    @skidding
    heh
    Sergey Lapin
    @sergey-lapin
    I mean it just would be interesting and useful to have whole history of playground. My idea is just clone original repo and traverse all commits, simple and dirty
    Only tricky thing is to find playground in repo maybe some meta or strict format required
    Sergey Lapin
    @sergey-lapin
    Commits are immutable thing so no need to traverse another time, cache saves as all
    Ovidiu Cherecheș
    @skidding
    you mean for the playground to read git commit meta data?
    Sergey Lapin
    @sergey-lapin
    No to find playground in repo - its location. Identify that it is a playground and render all components preferably to stream and with some info about initial fixtures, name, etc..
    If there no playground founded fall out
    You can label some folder with some special config file (playground.conf.js) or proc will check folder with some other criteria
    Ovidiu Cherecheș
    @skidding
    ok, I think I understood. pretty wild, yeah :)
    Sergey Lapin
    @sergey-lapin
    I can do git traverse thing, but it would be cool if you prepare cosmos in that way, if you like an idea
    Ovidiu Cherecheș
    @skidding
    well you need the components and fixtures folders, other than that node_modules/.bin/component-playgroundwill work on any given commit
    Sergey Lapin
    @sergey-lapin
    Are you sure that every user of cosmos will keep component-playground in path root/component-playground? it should be some strict criteria, maybe "component-playground" name of folder, or some meta config file with special name. It is up to you to decide
    This message was deleted
    var rootPath = path.join(__dirname, '..'), playgroundPath = path.join(rootPath, 'component-playground'); hardcode =(
    Ovidiu Cherecheș
    @skidding
    those paths are inside the cosmos package, not the project using it