Add field view getter to request editor
Review Request #9256 — Created Oct. 10, 2017 and submitted
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 <= … |
|
|
Unit tests for getFieldView and matchContains should be added to js/views/tests/reviewRequestEditorViewTests.js and listed in the Testing Done. This will be … |
|
|
While useful for JavaScript extensions, this change isn't extension-specific. It'd be better to word the summary and description to be … |
|
|
Should be "Return the view ..." and "ID". |
|
|
This is missing a "Returns" section. |
|
|
"ID" |
|
|
The tests in this file could use some cleanup, but would you mind making a top-level describe() for "Methods", and … |
|
-
-
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.
-
Unit tests for
getFieldView
andmatchContains
should be added tojs/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).
-
reviewboard/static/rb/js/views/reviewRequestEditorView.es6.js (Diff revision 1) Should be "Return the view ..." and "ID".
-
reviewboard/static/rb/js/views/reviewRequestEditorView.es6.js (Diff revision 1) This is missing a "Returns" section.
-
Change Summary:
Fixed comments and dropped the matchContains change after discussions on mailing list.
Summary: |
|
|||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+25) |
Checks run (2 succeeded)
-
-
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.
-
reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js (Diff revision 2) 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.
Summary: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||
Branch: |
|
|||||||||||||||
Commit: |
|
|||||||||||||||
Diff: |
Revision 3 (+27) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+29 -2) |