Convert the new RepositoryForm and RepositoryFormView to Spina.

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

chipx86
Review Board
release-6.x
reviewboard

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
Convert the new RepositoryForm and RepositoryFormView to Spina.
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
-
Convert the new RepositoryForm and RepositoryFormView to Spina.
+
Convert the new RepositoryForm and RepositoryFormView to Spina.

Diff:

Revision 3 (+1072 -804)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/static/rb/js/admin/views/repositoryFormView.ts (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    These could all be private.

  3. 
      
Loading...