by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 12 2019 17:44

    tbranyen on master

    chore: remove link to sketchy "… Update README.md Merge pull request #508 from wa… (compare)

  • Mar 12 2019 17:44
    tbranyen closed #508
  • Mar 12 2019 17:44
    tbranyen commented #508
  • Mar 12 2019 16:56
    wabreisch synchronize #508
  • Mar 12 2019 16:27
    wabreisch commented #508
  • Mar 12 2019 16:26
    wabreisch commented #508
  • Mar 12 2019 16:25
    wabreisch opened #508
  • Sep 19 2018 16:53
    tbranyen closed #502
  • Sep 19 2018 16:53
    tbranyen closed #409
  • Sep 19 2018 16:53
    tbranyen closed #386
  • Sep 19 2018 16:53
    tbranyen closed #379
  • Aug 01 2018 00:43

    tbranyen on master

    No longer maintained (compare)

  • Jul 19 2018 00:34
    ansonlouis commented #507
  • Jul 19 2018 00:27
    atomictag commented #507
  • Jul 19 2018 00:18
    ansonlouis commented #507
  • Jul 19 2018 00:00
    atomictag commented #507
  • Jul 18 2018 23:59
    atomictag commented #507
  • Jul 18 2018 23:26
    ansonlouis commented #507
  • Jul 18 2018 23:19
    atomictag commented #507
  • Jul 18 2018 23:18
    atomictag commented #507
Tim Branyen
@tbranyen
How is that possible though?
that's valid promise syntax
Oh, wait it's not then related is it? It's the promise function that's the culprit
urgh, this is a tough one
foligny
@foligny
Hi !
I'm trying to find out when all the child views have rendered.
In the main view I loop over collection as row and call multiple time self.insertView(row)
Unfortunately it seems that afterRender() of the main view happens before the child views are rendered. What is the best way to know that all view I have inserted have rendered ? Thanks!!
Tim Branyen
@tbranyen
Hrm, if you do parent.renderViews() afterRender will happen after the children are done
foligny
@foligny
Where should I do parent.renderViews() ? Wont this render twice my views ?
Tim Branyen
@tbranyen
@foligny hrm, I guess I'm not sure what your issue is. the regular render method will not emit afterRender until all child views have rendered
foligny
@foligny
@tbranyen I double checked that child's view afterRender are fired after parent view. Maybe it is because the child views are added in beforeRender() of the parent's view ?
foligny
@foligny
Is there a way I can get the render promise of a view ?
Tim Branyen
@tbranyen
@foligny .promise()
Tim Branyen
@tbranyen
@foligny were you able to resolve your issue
i'd like to help more if not
since the point of the render flow is that parents are not fully resolved until child views are
foligny
@foligny
Hi! No I wasn't able because view.promise() is undefined. Also the product's UI I'm working on uses an older version of backbone.layoutmanager. Also renderViews() is not called; instead _render() is called originating from root._registerWithRAF(actuallyRender, def); in the call stack. I guess my next step would be to try the latest version of layoutmanager. But in the meantime I found a workaround to resolve my original problem.
Tim Branyen
@tbranyen
Oh darn, that really stinks. There were some major issues in some versions of LM
Sorry you happen to be one that most likely experiences that particular bug
foligny
@foligny
Thanks Tim, no worries.
Simen Bekkhus
@SimenB
Is there any particular reason why I can't define views as a function? This would match Backbone's functionality where most (all?) attributes can either be defined statically or as a function
I realise I can achieve what I want in beforeRender using setViews, but I like how declarative views are
Tim Branyen
@tbranyen
That feature could definitely be added @SimenB
Joshy Cyriac
@joshy
Hi Tim, it seems the domain layoutmanager.org has been expired
Tim Branyen
@tbranyen
Darn, I saw notices about it. Thanks for the heads up!
Tim Branyen
@tbranyen
@SimenB looks like we had some weirdness with QUnit and calling the async start() method inside of then. basically need to do then(function() { start(); }) instead of then(start)
Simen Bekkhus
@SimenB
Did tests break? or just weird behavior?
Tim Branyen
@tbranyen
Tests broke
My guess is that qunit had that 'breaking change' rolled up into a patch release which we picked up accidentally
good to have it fixed anyways
It was just test file changes, nothing in the source
t. m. k.
@teehemkay
Hi All.
I've noticed something strange: there are two versions of layoutmanager in the npm repository: layoutmanager and backbone.layoutmanager.
t. m. k.
@teehemkay

They both point to the same git repository but they have some subtle differences in that they require different versions on backbone.
layoutmanager requires backbone 1.2.1 but backbone.layoutmanager requires backbone 1.1.2. This is a bit confusing.
Looking on github I can't find the version of layoutmanager that was published in npm as layoutmanager.

There are some useful change in backbone 1.2.x to enable its use without jQuery which I'm interested in so I guess my question is what's the status on supporting backbone 1.2.x?

Thanks!

Tim Branyen
@tbranyen
@teehemkay heya, i think someone is trying to fully support it here: https://github.com/tbranyen/backbone.layoutmanager/issues/481#issuecomment-155997951
But keep in mind if you're only using layoutmanager on the client side, it already supports backbone 1.2.0
t. m. k.
@teehemkay
@tbranyen Thanks for the pointer!
Attila Egyed
@tsm91

hello, it might be a dumb question but is it possible to use layout manager without template rendering?

The server will render all views and will pass a html string over ajax that i will append to the dom.

Tim Branyen
@tbranyen
@tsm91 how are you rendering the backend?
@tsm91 layoutmanager has the ability to render in Node and maintain the render tree (much like react). would allow you to eliminate the initial render, and then take over on the client side. if you are using something like asp.net or php (non-node) stuff and just want to hook into the markup and progressively enhance it, i'm thinking a tree/component approach with redux might be a good bet
Attila Egyed
@tsm91
yes, the latter approach with php
hmm you are saying i should use redux and not backbone? i am not quite familiar with bb , neither redux. so i dont mind
Attila Egyed
@tsm91
but im not exactly sure how redux will help in this scenario. can you describe the stack that comes with your approach in a little more detail?
so yes, a php server will render the initial page (blade templating of laravel) and any additional template will probably be rendered on the server too and passed over xhr as a string
Eugene
@godknowsiamgood
Hello! how can I get access to parent view from child view?
Tim Branyen
@tbranyen
Can you pass a reference to the child from the parent?
childView.parentView = this;
this.setView(childView);
Eugene
@godknowsiamgood
sure, I wonder why there is no standard approach in a library
Tim Branyen
@tbranyen
Because developers are finding two way traversal isn't a good way to structure apps