Convert a few more views to ES6.

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

Information

Review Board
release-4.0.x
ee5c303...

Reviewers

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

Ran js-tests.

Description From Last Updated

This line is too long.

chipx86chipx86

Wrong multi-line comment format.

chipx86chipx86

Indented one level too far.

chipx86chipx86

Array

chipx86chipx86

This line's too long.

chipx86chipx86

Space after arg name.

chipx86chipx86

Can we spread this across lines?

chipx86chipx86

For readability, can we move the nameToRow[fieldName] bit out into something like elIndex? Took me a minute to figure out …

chipx86chipx86

Missing trailing comma.

chipx86chipx86

Missing trailing comma.

chipx86chipx86

Trailing comma?

chipx86chipx86

Col: 27 'errorListEl' is defined but never used.

reviewbotreviewbot

I don't think we do this anywhere else for options. Instead, we list the individual options as optional if they …

chipx86chipx86

There's no event parameter in this function.

chipx86chipx86

Same here.

chipx86chipx86
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...