Add field view getter to request editor

Review Request #9256 — Created Oct. 10, 2017 and submitted

Information

Review Board
release-3.0.x
9e77ac6...

Reviewers

With the new getFieldView method, JavaScript code can get hold of the
view that handles editing for a given field ID, such as target_groups.

Unit tests.

Description From Last Updated

There's a format we like to see for descriptions. They should always stand alone from the summary, wrap to <= …

chipx86chipx86

Unit tests for getFieldView and matchContains should be added to js/views/tests/reviewRequestEditorViewTests.js and listed in the Testing Done. This will be …

chipx86chipx86

While useful for JavaScript extensions, this change isn't extension-specific. It'd be better to word the summary and description to be …

chipx86chipx86

Should be "Return the view ..." and "ID".

chipx86chipx86

This is missing a "Returns" section.

chipx86chipx86

"ID"

chipx86chipx86

The tests in this file could use some cleanup, but would you mind making a top-level describe() for "Methods", and …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    There's a format we like to see for descriptions. They should always stand alone from the summary, wrap to <= 72 characters, and explain what problem needed solving, why, and how it was solved.

    We use these directly for commit messages, so we have a writeup covering both:

    https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea

    The summary should ideally also explicitly mention "JavaScript extensions", and end with a period.

  3. Show all issues

    Unit tests for getFieldView and matchContains should be added to js/views/tests/reviewRequestEditorViewTests.js and listed in the Testing Done. This will be more useful to us than your extension's testing, because it'll ensure there won't be regressions, and is "proof" that this works as expected.

    You can run the test suite by going to http://localhost:8080/js-tests/ (assuming usage of a dev server).

  4. Show all issues

    Should be "Return the view ..." and "ID".

  5. Show all issues

    This is missing a "Returns" section.

  6. Show all issues

    "ID"

  7. 
      
erijo
chipx86
  1. 
      
  2. Show all issues

    While useful for JavaScript extensions, this change isn't extension-specific. It'd be better to word the summary and description to be more about the purpose of the method itself, leaving off the extensions parts.

    Text also wraps a bit too short. ~72 characters would be best.

  3. Show all issues

    The tests in this file could use some cleanup, but would you mind making a top-level describe() for "Methods", and place this in there? The description should be the method name.

  4. 
      
erijo
david
  1. Ship It!
  2. 
      
erijo
erijo
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (19981a1)