Add field view getter to request editor

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

Erik Johansson
Review Board
release-3.0.x
9e77ac6...
reviewboard

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.

  • 0
  • 0
  • 7
  • 0
  • 7
Description From Last Updated
Christian Hammond
  1. 
      
  2. 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. 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. Should be "Return the view ..." and "ID".

  5. This is missing a "Returns" section.

  6. 
      
Erik Johansson
Christian Hammond
  1. 
      
  2. 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. 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. 
      
Erik Johansson
David Trowbridge
  1. Ship It!
  2. 
      
Erik Johansson
Erik Johansson
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (19981a1)
Loading...