Skip to content

Document the vendored libraries and why some stay - #15

Merged
erseco merged 1 commit into
mainfrom
docs/vendored-libraries
Sep 19, 2026
Merged

erseco merged 1 commit into
mainfrom
docs/vendored-libraries

Conversation

@erseco

@erseco erseco commented Sep 19, 2026

Copy link
Copy Markdown

The dependencies that matter in this repository are files, not package.json entries, and 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 each:

Host-provided — jQuery 3.7.1, jQuery UI 1.14.1, FileSaver 2.0.5. Loaded by the page, deliberately not bundled, byte-identical to the npm releases and to what eXeLearning ships.

Maintained upstream — mousewheel 3.2.2, minicolors 2.3.6. Tracked by version, updated as normal maintenance.

Retained legacy, with the reason in each case:

  • jquery.hotkeys 0.8 — one use site; works on jQuery 3.7.1; both halves of its contract are covered by tests (ctrl+z undoes once, a shortcut typed into a caption does not fire). Replacing a working 80-line file that tests cover, because it is old, trades a known quantity for an unknown one.
  • dragscrollable 1.0not an upgradable dependency. No release since 2009, and this copy is not upstream's: David Richard added delegateMode in 2011. An "update" would mean taking a different project and reapplying that change.
  • Aristo-derived stylesheet — this is the editor's appearance. app.css carries the rules adapting it to jQuery UI 1.14 markup (controlgroups inline where buttonsets were; the .ui-front stacking rule the theme predates, without which modal dialogs sit under their own overlay). Replacing it belongs to a visual redesign with screenshot coverage.

docs/jquery-tmpl-replacement.md

The one that needs evidence rather than a verdict, because it crosses repositories: the implementation is bundled here, the seven templates live in eXeLearning's editor/index.html.

It lists the eight call sites, the seven templates, and the syntax actually used — ${...} ×13, {{if}} ×2, {{html}} ×2, and nothing else the library offers. Four of the eight call sites pass no data at all, so they are static markup that needs no template engine.

Two findings worth having written down before anyone starts:

  • #template-export-map is referenced by ExportMap.js but is not among eXeLearning's templates — that command is not wired into its toolbar.
  • #template-open-table-item is the only template rendering a list and using $item, and the only one without browser coverage. That is where a replacement should start.

No code changes.

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.
@erseco
erseco merged commit b12d1ff into main Sep 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant