Expose extra data API through new attribute
Review Request #7433 — Created June 17, 2015 and submitted
This patch returns each resource's
extraData
model attribute to be a
plain JavaScript object. The new extra data API (viaRB.ExtraData
) is
exposed throughmodel.extraData
instead of
model.attributes.extraData
. This will prevent extensions that use the
old API from breaking but still expose the new API. JS tests have been
updated to reflect these changes.
Ran JS tests.
Tested with the rbstopwatch extension. It worked with this patch
applied.
Description | From | Last Updated |
---|---|---|
Can you add a doc comment? |
chipx86 |
- Change Summary:
-
Add some documentation.
- Commit:
-
7c209d81501eaaf297bae08c7279f2f3de5feecad02cb5515f9b36567f928de4d35dc4f7a54cfae7
- Diff:
-
Revision 2 (+105 -89)
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
- Change Summary:
-
Greatly simplify
set
. Fix so tests and extensions work. - Testing Done:
-
~ Ran JS tests.
~ Ran JS tests.
+ Tested with the rbstopwatch extension. It worked with this patch + applied. - Commit:
-
d02cb5515f9b36567f928de4d35dc4f7a54cfae76ab143dcc06a7e231a188a609d72f7927039e737
- Diff:
-
Revision 3 (+110 -96)
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/resources/models/tests/fileAttachmentCommentModelTests.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js reviewboard/static/rb/js/models/tests/extraDataTests.js reviewboard/static/rb/js/models/extraDataMixin.js reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js