Convert the new RepositoryForm and RepositoryFormView to Spina.

Review Request #12820 — Created Jan. 31, 2023 and updated — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This change updates the brand-new in-progress RepositoryForm and
RepositoryFormView classes in JavaScript to use TypeScript and
Spina-based classes instead of Backbone.

This gives us proper type checking for both the model and form, using
interfaces to define available attributes (which also ensures proper
.get() usage on models). It also enables usage of private methods.

Other than porting and documentation, this doesn't fundamentally alter
much of the code. Logic remains the same.

The new code is also now part of the rb/js/admin Rollup bundle, rather
than being listed explicitly in the Pipeline bundle.

Ran through all the various modes in the repository admin form. Didn't
spot any noticeable issues. Verified I was running the new generated
code.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Convert the new RepositoryForm and RepositoryFormView to Spina.
This change updates the brand-new in-progress `RepositoryForm` and `RepositoryFormView` classes in JavaScript to use TypeScript and Spina-based classes instead of Backbone. This gives us proper type checking for both the model and form, using interfaces to define available attributes (which also ensures proper `.get()` usage on models). It also enables usage of private methods. Other than porting and documentation, this doesn't fundamentally alter much of the code. Logic remains the same. The new code is also now part of the `rb/js/admin` Rollup bundle, rather than being listed explicitly in the Pipeline bundle.
c7dc6a571f003320167a01d5bd511d1ed29736bd Christian Hammond
reviewboard/staticbundles.py
reviewboard/static/rb/js/admin/index.ts
reviewboard/static/rb/js/admin/models/repositoryFormModel.es6.js
reviewboard/static/rb/js/admin/models/tests/repositoryFormModelTests.es6.js
reviewboard/static/rb/js/admin/views/repositoryFormView.es6.js
reviewboard/templates/admin/scmtools/repository/change_form.html
Loading...