Convert the new RepositoryForm and RepositoryFormView to Spina.

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

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.

Summary ID
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.
a94b2defd0afd0e20e05cc670ae93240fcb0e3c4
Description From Last Updated

This can be private.

daviddavid

This can be private.

daviddavid

These could all be private.

daviddavid
chipx86
chipx86
Review request changed

Change Summary:

  • Made fields in the attribute interfaces optional, to ease dynamically building attributes.
  • Changed some "tool" references to "scmtool", for consistency.

Commits:

Summary ID
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
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.
a94b2defd0afd0e20e05cc670ae93240fcb0e3c4

Diff:

Revision 3 (+1072 -804)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. Show all issues

    This can be private.

  3. Show all issues

    This can be private.

  4. reviewboard/static/rb/js/admin/views/repositoryFormView.ts (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    These could all be private.

  5. 
      
Loading...