Port config forms JS codebase to TypeScript/spina.
Review Request #13140 — Created July 13, 2023 and submitted
This change ports the JavaScript side of the config forms app to use
TypeScript and spina.For the most part this is a very straightforward port. The only annoying
thing was I discovered that theListItem
implementation allowed
passing in anactions
parameter which was treated as an option arg,
but was actually being passed in as part of the attributes (despite not
being an attribute on the model). This was only used inside of our unit
tests (which have themselves been updated to usesetActions
), but I've
added some compatibility code to emit a deprecation warning just in the
very unlikely case that someone was using this.
Ran js-tests.
Summary | ID |
---|---|
67d63b3d82d46d0d02a1a17da7d20ed28ba7d5e1 |
Description | From | Last Updated |
---|---|---|
I think this should say "This operates just like a..."? |
maubin | |
Should say "stores" instead of "stored". |
maubin | |
4.0? Same below. |
chipx86 | |
suite actually comes from us. |
chipx86 | |
Should use double ticks around "template" |
maubin | |
I think we need to map this to an explicit type mapping strings -> strings for subclasses to extend, otherwise … |
chipx86 | |
Should document this and any other instance variables. |
maubin | |
Can we add docs to these? The public ones at least. |
chipx86 | |
It'd be nice to have a type for this that can be imported. |
chipx86 | |
Since this is for returning any arbitrary mapping of data for use during render, I don't think we want unknown. … |
chipx86 | |
This should end with ,, and ) { on the next line. |
chipx86 | |
Missing docs. |
chipx86 | |
Can we add docs for these? |
chipx86 | |
Can we add docs for at least public variables? |
chipx86 | |
Let's follow the pattern in Review Board and have a tests/index.ts in each {models,views}/tests/ directory, and just import that directory. … |
chipx86 | |
Can you decorate Backbone.Collection with :js:class? |
chipx86 | |
I think these have to use 1. and 2. to format correctly in ReStructuredText. |
chipx86 | |
Can you decorate fetch with :js:meth? |
chipx86 |
-
-
-
-
I think we need to map this to an explicit type mapping strings -> strings for subclasses to extend, otherwise it'll be limited to these values.
-
-
Since this is for returning any arbitrary mapping of data for use during render, I don't think we want
unknown
. I think we want an interface that maps any string key to any value. -
-
-
-
-
Let's follow the pattern in Review Board and have a
tests/index.ts
in each{models,views}/tests/
directory, and just import that directory.For example, Review Board's
js/tests/index.ts
has:import '../common/models/tests'; import '../common/resources/collections/tests'; import '../common/resources/models/tests'; import '../common/views/tests'; import '../reviews/models/tests'; import '../reviews/views/tests'; import '../ui/views/tests';
- Commits:
-
Summary ID 6ff9a26b8e11d5b691c9c89f78dfd1eb7c628b31 32853981b0755bb4adfc93b1510b40c92735de31 - Diff:
-
Revision 2 (+1806 -1138)
Checks run (2 succeeded)
- Commits:
-
Summary ID 32853981b0755bb4adfc93b1510b40c92735de31 67d63b3d82d46d0d02a1a17da7d20ed28ba7d5e1 - Diff:
-
Revision 3 (+1814 -1140)