change(developer): move touch layout editor to typescript - #16520
change(developer): move touch layout editor to typescript#16520mcdurdin wants to merge 5 commits into
Conversation
User Test ResultsTest specification and instructions Retesting TemplateTest Artifacts
|
b5f6a2b to
321c0fa
Compare
5d01473 to
0fb009b
Compare
2d198a3 to
76b36e8
Compare
Minimal changeover to esm, use tsc to build. Builds and runs. Installer will still include source files and the editor should be moved outside of the xml/ folder later.
Note: doesn't build, just for history
Make minimal changes to Touch Layout Editor source files in order to build with Typescript with noImplicitAny=false (to be cleaned up later). Also make source files accessible through the web server for Developer Console use.
Take the @types/jquery and @types/jqueryui packages out of the devDependencies and place the index.d.[c]ts files into the ext folder. This is needed because of fragility elsewhere with implicitly imported types, which is described for resolution in #16535. Keeping this as a separate commit as preference would be to have these dependencies managed through npm long-term. See-also: #16535
0fb009b to
d86b2b5
Compare
…ayout editor In order to resolve initialization order (see instigating property `builder.lastPresentations`), split all constants into a separate object `builderConstants`, inverting the dependency, which is both cleaner and the first step of removing the multi-module initialization of a single `builder` variable.
There was a problem hiding this comment.
Unused source file, detected during renames
Test Specs
Test Results
|
jahorton
left a comment
There was a problem hiding this comment.
LGTM. Might want to fix or explicitly defer the TODO entries, though.
| KEYMANCORE_PDB=keymancore-2.pdb | ||
|
|
||
| function do_build_touch_layout_editor() { | ||
| # TODO: this could be a configure step but leaving it here while changes are in flux |
There was a problem hiding this comment.
I assume there is a plan to handle these TODOs in a separate PR, given they're still in the incoming changeset?
| # todo: make this an internal dependency | ||
| do_build_touch_layout_editor |
| begin | ||
| doc := ARequestInfo.Document; | ||
| if doc.StartsWith('/app/source/toucheditor/lib/') and (Pos('..', doc) = 0) then | ||
| if doc.StartsWith('/app/source/toucheditor/src/') and (Pos('..', doc) = 0) then | ||
| begin | ||
| Delete(doc, 1, Length('/app/source/toucheditor/lib/')); | ||
| Delete(doc, 1, Length('/app/source/toucheditor/src/')); | ||
| RespondFile(GetLayoutBuilderPath + 'src/' + doc, AContext, ARequestInfo, AResponseInfo); | ||
| end | ||
| else if doc.StartsWith('/app/source/toucheditor/lib/') and (Pos('..', doc) = 0) then | ||
| begin | ||
| Delete(doc, 1, Length('/app/source/toucheditor/lib/')); | ||
| RespondFile(GetLayoutBuilderPath + 'build/' + doc, AContext, ARequestInfo, AResponseInfo); | ||
| end |
There was a problem hiding this comment.
Seems a touch WET, but I do see the distinction between src/ and build/ for the RespondFile statements.
Furthermore, it appears that the lib entries refer to the built versions of the TS files? Basically, anything with a lib path redirects to the TS build output?
The new src entries thus refer to the original, foundational TS source, then?





A change in
threefive commits. It will be easiest to review these changes commit-by-commit and with whitespace changes ignored.31999ce: Minimal changeover to esm, use tsc to build. Builds and runs. Installer will still include source files and the editor should be moved outside of the xml/ folder later.
173e2ec: Rename touch layout editor .js to .ts - note: doesn't build, just for history, and simplicity of review.
c1abf5f: Make minimal changes to Touch Layout Editor source files in order to build with Typescript with noImplicitAny=false (to be cleaned up later). Also make source files accessible through the web server for Developer Console use.
d86b2b5: moves jquery and jqueryui out of node_modules, due to implicit import conflicts in other Typescript modules in /web (long term resolution proposed in maint(common): consider declaring used types/libs in each tsconfig.json #16535)
98fee32: fixup initialization order for constants (triggered by recent change fix(developer): remember presentation and layer when switching platforms in touch layout editor #16509, which prompted the refactor when it was merged into this branch)
User Testing
TEST_REGRESSION: Open the touch layout editor, press F12 to view Developer Console. Run through all the standard operations of the touch layout editor and verify no errors in Developer Console and that all operations work correctly.
Things to test:
You may wish to compare behaviour against the existing alpha release version.