by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 12 09:22
    paulfalgout commented #3077
  • May 12 09:19
    rvnath commented #3077
  • Apr 08 05:38

    paulfalgout on master

    docs: Fix simple typo, override… (compare)

  • Apr 08 05:38
    paulfalgout closed #3676
  • Apr 06 21:09
    coveralls commented #3676
  • Apr 06 21:08
    timgates42 commented #3676
  • Apr 06 21:08
    timgates42 synchronize #3676
  • Apr 06 19:49
    coveralls commented #3676
  • Apr 06 19:47
    timgates42 opened #3676
  • Mar 11 14:32
    paulfalgout labeled #3675
  • Mar 11 05:20
    danspam opened #3675
  • Feb 05 08:48
    paulfalgout commented #3209
  • Jan 19 01:34
    Purlicue commented #3209
  • Dec 20 2019 15:18

    paulfalgout on master

    Event doc update default value… (compare)

  • Dec 20 2019 15:18
    paulfalgout closed #3674
  • Dec 20 2019 13:03
    coveralls commented #3674
  • Dec 20 2019 13:02
    mochja edited #3674
  • Dec 20 2019 13:01
    mochja opened #3674
  • Oct 21 2019 06:40

    paulfalgout on master

    docs: Fix typos in Class Events… (compare)

  • Oct 21 2019 06:40
    paulfalgout closed #3673
Sohan Kumar
@sohankd
Well. How can it be even possible,because the file will load the dependencies,right ? And i call the Custom function in before() of application while renders the layout onStart() of application.
Paul Falgout
@paulfalgout
this.layout = new Layout();
this.show(this.layout);  <-- attach
Custom(app); <- app.getLayout().on('attach',
@sohankd
Sohan Kumar
@sohankd
@paulfalgout thanks paul
Alex Pounds
@creature
I'm working with a Marionette 2 project. One thing that comes up semi-frequently is some UI element that has 5-10 options, something like ui: { tab: 'ul.tab_list li' }. And then in the click handler, triggered via the events hash, the first line ends up as var clickedTab = this.$(ev.target). This feels a bit messy to me; is there a better way to figure out exactly what was clicked, without needing to write an explicit click handler for each tab?
Paul Falgout
@paulfalgout
a collection view?
Alex Pounds
@creature
A layout.
Paul Falgout
@paulfalgout
well what I mean is that a collection view solves that issue
Alex Pounds
@creature
Ah, right, yes. Sorry, my bad. :) Do you think that's still a good approach if the tabs don't map directly onto data? They're something like "Today/this week/this month/this year/past"?
Paul Falgout
@paulfalgout
hmm or different ui elements ui.tabToday ui.tabThisWeek etc
Alex Pounds
@creature
Mmm. And then I have to have different click handlers for each (or do something a bit more squirrelly, like ui: { tabToday: clickHandlerFor('today') }. Which avoids the this.$(ev.target), but ends up as more code and probably harder to follow.
GRamachandra
@GRamachandra
How do I achieve infinite scroll in marionette using Intersection Observer ? Does behaviours help here ? or do we beed a separate resusble view for the intersection observer ?
Bruno Foggia
@brunnofoggia
Is there anyone that thinks marionette should have a respectful place in the market?
Anyone that agrees HTML inside of JS isn't the best that can be delivered?
Or am I monstrously mistaken?
FontCasper
@FontCasper_twitter

We're using Marionette for a page editor consisting of content modules. Each content module can be edited in a dynamically generated user interface (text fields, selects, radio buttons etc) presented in groups/collections and sub groups/collections.

On Chrome everything is good, but on Safari we're seeing major performance hits when presenting these user interfaces on bigger pages, even though the generated interface is minimal — up to 2 seconds for showing just a couple of text areas mostly spent in backbone.marionette empty() and backbone.marionette render().

My immediate guess is it is because of low memory and gc.

Instead of destroying and creating the views, I want to explore reusing them.
Do you have any advice for how to best approach this?

gregid
@gregid
Is it possible to add region to CollectionView (CompositeView)? I tried this.myRegion = new Region... and adding a view in onRender but got the RegionError message: An "el" must exist in DOM for this region the el is in the template for CollectionView though?
Paul Falgout
@paulfalgout
this.myRegion = new Region({ el: this.ui.foo })should work
gregid
@gregid
thanks Paul but this is exactly what I got. It looks like onRender when I this.myRegion.show(aView) the el is not yet in the DOM
Paul Falgout
@paulfalgout
what is el when you're passing it to the region?
gregid
@gregid
apologies, you were right - when using this.ui it works - I didn't think this could make a difference
I thought you were showing me how to set up new Region and not to use this.ui
and thank you!
heeplr
@heeplr
hi
is there a clean way to execute code on the el attached to the DOM including all children from the template?
i'm fairly new to marionette and i'm trying to integrate https://github.com/Johann-S/bs-stepper/
with backbone, i'd use a custom renderer like { this.$el.html(this.template(...)) ; mycode ... } but for marionette i can't find a best practice.
with onDomRefresh(), only this.el is attached to the DOM but not the contents of the template and with onRender() the el isn't attached, yet
Paul Falgout
@paulfalgout
can you give an example of mycode?
what version of marionette are you using?
heeplr
@heeplr
the actual code would be: var stepper = new Stepper(this.$el.find('.bs-stepper'));
i'm using v4.1.2
Paul Falgout
@paulfalgout
ok.. so "only this.el is attached to the DOM but not the contents" this seems to be a problem. In 4.1.2 you should definitely already have content by dom:refresh
heeplr
@heeplr
hm, i'm probably doing something wrong. i'll check again
Paul Falgout
@paulfalgout
dom:refresh should trigger if the contents of this.el are attached to or are changed within the DOM.
it should only happen after the view's first render.
heeplr
@heeplr
is it attached to the DOM or abou to be attached? I get "querySelectorAll" is not a function
*about
dom:refresh is only triggered if the view believes it is both rendered (el has contents) and attached (el is in the DOM).
heeplr
@heeplr
very strange. When I set a breakpoint in onDomRefresh I can see the template rendered in the browser (so it's obviously attached to the DOM) but when I look at the DOM in the inspecter, the node is still empty. When I continue the code, i still get the "this._element.querySelectorAll is not a function" exception
... on this.$el.find("#myStepper")
Paul Falgout
@paulfalgout
is #myStepper inside this.$el?
heeplr
@heeplr
yes, i think so. it's in the template and I can see it rendered on the screen
Paul Falgout
@paulfalgout
in onDomRefresh you get the el you're expecting?
heeplr
@heeplr
oh wait... i found the error
this.$el.find("#myStepper") failed but this.$el.find("#myStepper")[0] seemst to work
i don't really get why, tho :)
thanks for your help tho
Paul Falgout
@paulfalgout
ah yeah this.$el.find("#myStepper") is jquery and this.$el.find("#myStepper")[0] is the actual dom element which would have querySelectorAll on it