Add some additional features to RB.CollectionView.

Review Request #7837 — Created Dec. 28, 2015 and submitted

Information

Review Board
release-2.5.x

Reviewers

This change adds a few new things to RB.CollectionView:
- The view will properly respond when the collection is reset.
- The view will reorder DOM elements for sorted collections.
- The itemViewType can be passed in as an option at construction time, rather
than requiring CollectionView to be extended.
- A new itemViewOptions member allows options to be plumbed through to the
individual item views.

Used these features in another change (in Power Pack).

Description From Last Updated

Why not _onAdded, _onRemoved, etc?

chipx86chipx86

Can we say what this does in more detail?

chipx86chipx86

Blank line between these.

chipx86chipx86

One-line summary.

chipx86chipx86
chipx86
  1. Can we get unit tests for these?

  2. reviewboard/static/rb/js/views/collectionView.js (Diff revision 1)
     
     
     
     
     
    Show all issues

    Why not _onAdded, _onRemoved, etc?

  3. Show all issues

    Can we say what this does in more detail?

  4. Show all issues

    Blank line between these.

  5. Show all issues

    One-line summary.

  6. 
      
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/collectionView.js
    
    
  2. 
      
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/collectionView.js
    
    
  2. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/collectionView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/collectionView.js
    
    
  2. 
      
david
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/tests/collectionViewTests.js
        reviewboard/static/rb/js/views/collectionView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/tests/collectionViewTests.js
        reviewboard/static/rb/js/views/collectionView.js
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (356b8a3)
Loading...