Convert a few more views to ES6.

Review Request #10305 — Created Nov. 2, 2018 and submitted

david
Review Board
release-4.0.x
ee5c303...
reviewboard

This change migrates the remaining files in rb/js/views/ to ES6 syntax
and features.

Ran js-tests.

  • 0
  • 0
  • 14
  • 1
  • 15
Description From Last Updated
david
chipx86
  1. 
      
  2. This line is too long.

  3. Wrong multi-line comment format.

  4. Indented one level too far.

  5. This line's too long.

  6. Space after arg name.

  7. Can we spread this across lines?

  8. For readability, can we move the nameToRow[fieldName] bit out into something like elIndex? Took me a minute to figure out what this was doing.

    Also, if we're indexing it this way, we're getting a DOM element, not a jQuery element.

  9. Missing trailing comma.

  10. Missing trailing comma.

  11. 
      
david
Review request changed
david
chipx86
  1. 
      
  2. I don't think we do this anywhere else for options. Instead, we list the individual options as optional if they are.

    1. We do where there's actually a default value (options={}) and the entire parameter is optional.

  3. 
      
chipx86
  1. 
      
  2. reviewboard/static/rb/js/views/uploadDiffView.es6.js (Diff revision 4)
     
     
     
     
     
     
     
     

    There's no event parameter in this function.

  3. reviewboard/static/rb/js/views/uploadDiffView.es6.js (Diff revision 4)
     
     
     
     
     
     
     

    Same here.

  4. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (119f102)
Loading...