From d11984ee00c868535c6ae0083270f5669502000d Mon Sep 17 00:00:00 2001 From: erseco Date: Sat, 19 Sep 2026 10:07:32 +0100 Subject: [PATCH] Document the vendored libraries and why some stay The dependencies that matter here are files, not package.json entries, and until now nothing recorded what they are or why the old ones had not been replaced. That left every future reader to work it out again, and made "it is old" look like a sufficient reason to change something. docs/vendored-libraries.md splits them by what can actually be done with them: host-provided (jQuery, jQuery UI, FileSaver), maintained upstream (mousewheel, minicolors), and retained legacy with the reason in each case. jquery.hotkeys works on jQuery 3.7.1 and both halves of its contract are covered by tests. dragscrollable has had no release since 2009 and the copy here is not upstream's -- David Richard added delegateMode in 2011 -- so it is application source carrying a third-party header, not an upgradable dependency. The Aristo-derived stylesheet is the editor's appearance, and app.css carries the rules that adapt it to jQuery UI 1.14 markup. docs/jquery-tmpl-replacement.md is the one that needs evidence rather than a verdict, because it crosses repositories: the implementation is bundled here and the seven templates live in eXeLearning's editor page. It lists the eight call sites, the templates, and the three syntax features actually used out of everything the library offers -- four call sites pass no data at all. It also notes that #template-export-map is referenced but not present in eXeLearning's page, and that #template-open-table-item, the only one rendering a list, is the piece without test coverage and the place to start. --- docs/jquery-tmpl-replacement.md | 80 ++++++++++++++++++++++++++++ docs/vendored-libraries.md | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 docs/jquery-tmpl-replacement.md create mode 100644 docs/vendored-libraries.md diff --git a/docs/jquery-tmpl-replacement.md b/docs/jquery-tmpl-replacement.md new file mode 100644 index 00000000..126bbb8b --- /dev/null +++ b/docs/jquery-tmpl-replacement.md @@ -0,0 +1,80 @@ +# Replacing jquery.tmpl — scope note + +`jquery.tmpl` was abandoned in 2011 while still labelled `1.0.0pre`. It works on jQuery +3.7.1 and everything built with it is covered by browser tests, so there is no urgency. +This note exists so that replacing it can be decided on evidence rather than estimated +from scratch later. + +**It is not a dependency bump.** The implementation is bundled by this repository; the +templates it renders live in eXeLearning, in +`public/libs/tinymce_5/js/tinymce/plugins/exemindmap/editor/index.html`. Replacing it +means changing both repositories together, and the fork cannot do it alone. + +## Call sites + +Eight, all of the form `$("#template-x").tmpl(data)`: + +| File | Template | Data | +|---|---|---| +| `FloatPanel.js` | `#template-float-panel` | `{ title }` | +| `Inspector.js` | `#template-inspector` | none | +| `Navigator.js` | `#template-navigator` | none | +| `Notification.js` | `#template-notification` | the notification options | +| `ExportMap.js` | `#template-export-map` | none | +| `SaveDocument.js` | `#template-save` | none | +| `OpenDocument.js` | `#template-open` | none | +| `OpenDocument.js` | `#template-open-table-item` | an array of documents, plus `$item.format` | + +Four of the eight render a template with no data at all — those are static markup in a +`