Clean up some option plumbing through the review box views.

Review Request #8317 — Created Aug. 3, 2016 and submitted

Information

Review Board
release-3.0.x
3327fa2...

Reviewers

Some of the options passed through the various levels of views making up the
review list were named a little oddly, or could be made more specific.

Ran js-tests.

Description From Last Updated

No trailing comma for non-ES6 files.

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/reviewBoxListView.es6.js
        reviewboard/static/rb/js/pages/views/reviewRequestPageView.es6.js
        reviewboard/static/rb/js/views/tests/reviewBoxViewTests.js
        reviewboard/static/rb/js/views/tests/reviewBoxListViewTests.js
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/js/views/reviewBoxView.es6.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/reviewBoxListView.es6.js
        reviewboard/static/rb/js/pages/views/reviewRequestPageView.es6.js
        reviewboard/static/rb/js/views/tests/reviewBoxViewTests.js
        reviewboard/static/rb/js/views/tests/reviewBoxListViewTests.js
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/js/views/reviewBoxView.es6.js
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. Something to verify is that we're not breaking anybody with this change. Mozilla's more likely than most to be affected by this, so we could check with them.

    If needed, we could have compatibility attributes for these. I think the big one would be pageEditState, which we may really want to alias for now and document as deprecated. (Maybe we want to put together a page in Notion just to list these, so we can better assemble into release notes?)

    1. I'd love to have a clear picture of what constitutes our "API" and what constitues our "implementation" :(

      Added notes to https://www.notion.so/Review-Request-page-changes-for-3-0-8d27aac9e3ed4f81ac1e849ebb6127fe

    2. Yeah, we really don't have that very well defined... I'm just going off of code and discussions I've seen.

      The page, its state, and its objects should probably constitute API, though. That stuff would be common across pages with review UIs or JS-side extensions that need to grab information on the review request or edit state.

  2. No trailing comma for non-ES6 files.

    1. I don't see any good argument for restricting trailing commas to ES6. The transpiler doesn't do anything with them, and they were only a problem in IE8, which we're no longer supporting.

    2. OK, I suppose I'm willing to only do this for ES6 files if only to avoid an argument, but this file itself is deleted in a dependent change, so I'm not going to fix this instance.

    3. Sounds good.

      I'd be happy to move to trailing commas everywhere, but when researching this, it looked like IE9 could still have unexpected behavior/crashes at times, depending on the mode it's in. Newer versions work better. So at some point, when IE9 is a distant memory (not yet, sadly), we should be in good shape to use trailing commas everywhere.

  3. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (087fece)
Loading...