Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose normalizeUIString #3178

Closed
wants to merge 17 commits into from

Commits on Aug 19, 2016

  1. Allow childViews to be already rendered and attached

    If you were to override `buildChildView` instantiating the childViews with an `el` then you can create a collectionView from pre-rendered DOM
    paulfalgout committed Aug 19, 2016
    Configuration menu
    Copy the full SHA
    1312114 View commit details
    Browse the repository at this point in the history
  2. Move setElement to the views from the mixin

    CollectionView can’t be initially “rendered” because it does its initialization of many things on first render.
    paulfalgout committed Aug 19, 2016
    Configuration menu
    Copy the full SHA
    fe6aa19 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2016

  1. [test] CollectionView

    when a collection view is DOM
    * and it's not attached to the document
    ** should have _isAttached set to false
    
    * and it's attached to the document
    ** should have _isAttached set to true
    
    when rendering a childView
    * should not render childView twice
    rafde committed Aug 21, 2016
    Configuration menu
    Copy the full SHA
    5d74ec1 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2016

  1. [test] CollectionView

    when a collection view is DOM
    * and it's not attached to the document
    ** should have a child view without `_isAttached`
    
    * and it's attached to the document
    ** should have a child view with `_isAttached` set to `true`
    rafde committed Aug 24, 2016
    Configuration menu
    Copy the full SHA
    5034c32 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2016

  1. Merge pull request marionettejs#3135 from marionettejs/pjf/collection…

    …view-iso
    
    Allow CollectionView to be populated with pre-rendered DOM
    scott-w authored Aug 30, 2016
    Configuration menu
    Copy the full SHA
    8d41fc5 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2016

  1. Make a public detachView

    This function removes the need for a `preventDestroy` option.
    
    Essentially if you want to `preventDestroy` just detach the view first. When you want to preventDestroy you already have to have a copy of the view.. and depending on what is doing the view emptying `preventDestroy` can become a round about API.
    
    What you really want is
    ```js
    const myView = myRegion.currentView;
    myRegion.detachView();
    myOtherRegion.show(myView);
    ```
    paulfalgout committed Aug 31, 2016
    Configuration menu
    Copy the full SHA
    ba4c9d7 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2016

  1. Optimize triggerMethod, mergeOptions and hot handles (marionettejs#3144)

    * mergeOptions src/common/merge-options.js
    * iterate through `keys` and merge instead
      of getting the `keys` from options, then merging
    
    monitor-view-events  src/common/monitor-view-events.js
    * Define once:
       triggerDOMRefresh
       handleBeforeAttach
       handleAttach
       handleBeforeDetach
       handleDetach
       handleRender
    
    triggerMethodOn src/common/trigger-method.js
    * Distinct if `context` has triggerMethod, use and return result
       with fallback to helper function and return result
    
    CollectionView src/collection-view.js
    * private childViewEventHandle for optimization
    * _proxyChildEvents using childViewEventHandle
    
    src/common/trigger-method.js
    * will remember the last `event` name transform
    
    src/mixins/behaviors.js
    takes arraylike value only
    
    src/mixins/view.js
    triggerMethod
    only passes along `arguments` other functions
    
    * Make trigger on behavior follow same patterns as parent
    
    * Make childViewEventHandler a common module
    rafde authored and JSteunou committed Sep 1, 2016
    Configuration menu
    Copy the full SHA
    61d20b6 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2016

  1. Configuration menu
    Copy the full SHA
    ecd894b View commit details
    Browse the repository at this point in the history
  2. CollectionView and CompositeView removing views performance update. (m…

    …arionettejs#3105)
    
    * CollectionView# and CompositeView#
    
    _initialEvents
    * Listen to `this.collection~event:update` instead.
    
    _onCollectionUpdate
    * pass `options.changed.removed` to `this._removeChildViews`
    * updated test to reflect additions
    
     _removeChildViews
    * use array of models to determine what views to remove if not already destroyed.
    * Support `checkEmpty` for preventing empty collection checking
    
    _destroyChildren
    * checks to see if there are any children to destroy before calling `_removeChildViews`
    
    removeChildView
    * using _destroyChildView
    * added test for trying to remove falsy and valid values
    
    _getRemovedViews
    
    _removeChildView
    
    - ~~~_onCollectionRemove~~~
    * test and references removed
    
    _findGreatestIndexedView
    * finds the view with the greatest `_index` and returns it.
    
    _updateIndices
    * accepts array of views for _findGreatestIndexedView
    
    [test] when removing the sorted view, the `view._index` should update.
    
    * Attempts to always use models instead of modelOrViews
    
    This may not be helpful.. just wanted to give it one last show.
    I don’t think there are perf issues. particularly since `findByModel` is cheap.  In fact I think the complexity of reorder went down.. though I didn’t test it..
    rafde authored and JSteunou committed Sep 2, 2016
    Configuration menu
    Copy the full SHA
    4396132 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2016

  1. regions mixin

    detachView
    * falsy check
    
    Regions
    detachChildView
    rafde committed Sep 3, 2016
    Configuration menu
    Copy the full SHA
    57eab1f View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2016

  1. [test] View

    detachChildView
    rafde committed Sep 4, 2016
    Configuration menu
    Copy the full SHA
    59124d3 View commit details
    Browse the repository at this point in the history
  2. [test] Region

    detachView
    rafde committed Sep 4, 2016
    Configuration menu
    Copy the full SHA
    84ebc1d View commit details
    Browse the repository at this point in the history
  3. [documentation] Region#detachView

    [documentation] View#detachChildView
    rafde committed Sep 4, 2016
    Configuration menu
    Copy the full SHA
    53a1611 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2016

  1. Merge pull request marionettejs#4 from rafde/region-detachview-detach…

    …ChildView
    
    Region detachview detach child view
    paulfalgout authored Sep 5, 2016
    Configuration menu
    Copy the full SHA
    3f4e701 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2016

  1. CollectionView and CompositeView rendering views performance increase (

    …marionettejs#3113)
    
    * _createView
    * creates view from model and does event monitor and proxyChild events
    
    _renderChildView
    * render views and triggers render events
    
    _setupChildView
    * sets child view properties:
      parent, _index (conditionally), monitorViewEvents, and  _proxyChildEvents.
    
    * CollectionView
    
    addChildView
    * using `_setupChildView`
    * triggers `event~before:add:child`
    * triggers `event~add:child`
    * when buffering, will add view to list of children
      but will not update children length for performance increase
    * using `_renderView`
    
    ~~_addChildView~~
    
    _updateIndices
    * removed need to pass index
    
    _addChild
    * removed passing ChildView param
    * using `_createView`
    
    _onCollectionAdd
    * using `_addChild`
    
    _showCollection
    * using `_addChild`
    * calls `children._updateLength`
    
    _showEmptyView
    * removed unnecessary `view._parent` setting
    rafde authored and JSteunou committed Sep 7, 2016
    Configuration menu
    Copy the full SHA
    cffeb86 View commit details
    Browse the repository at this point in the history
  2. Merge pull request marionettejs#3155 from paulfalgout/region-detachview

    Make a public detachView
    scott-w authored Sep 7, 2016
    Configuration menu
    Copy the full SHA
    8c36b65 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2016

  1. Expose normalizeUIString

    Expose normalizeUIString, to parallel normalizeUIKeys and
    normalizeUIValues, issue marionettejs#3174.
    bazineta committed Sep 13, 2016
    Configuration menu
    Copy the full SHA
    b129a02 View commit details
    Browse the repository at this point in the history