Skip to content

Restore the editor's look on jQuery UI 1.14 - #18

Merged
erseco merged 1 commit into
mainfrom
fix/jquery-ui-button-theme
Sep 19, 2026
Merged

erseco merged 1 commit into
mainfrom
fix/jquery-ui-button-theme

Conversation

@erseco

@erseco erseco commented Sep 19, 2026

Copy link
Copy Markdown

Summary

The editor renders jQuery UI 1.14 widgets, but the Aristo-derived stylesheet and the widget calls still target jQuery UI 1.8. jQuery UI 1.12 rebuilt the button widget, so none of that markup exists any more: a button no longer carries ui-state-default, its label is a bare text node rather than a ui-button-text span, a buttonset is a controlgroup, and the icons option was replaced by icon.

The result is an editor that has lost its appearance. Every button falls back to the browser's own control, no icon is drawn anywhere, the navigator's zoom buttons are invisible because they are nothing but an icon, the font-style checkboxes grow the checkbox glyph that the checkboxradio widget draws by default, and a dialog's close control leaks the label that 1.12 started writing into it.

This restores the look the application had before the migration. The widget calls pass the options 1.14 reads, and app.css re-aims the theme's own declarations at the classes 1.14 emits. The theme itself is unmodified, and nothing about the dependencies changes.

What changed

  • ToolBar.jsicons: { primary } becomes icon. The menu's drop-down arrow was the secondary icon, which 1.12 removed, so it is appended by hand.
  • Navigator.jstext: false becomes showLabel: false, and icons becomes icon, which is what makes the zoom buttons visible again.
  • Inspector.js — the font-style checkboxes are initialised with icon: false, so they keep the label-only look they had under 1.8.
  • app.css — the button, hover, active and disabled rules, icon placement, controlgroup corners, the dialog close control, and the MiniColors swatch, all aimed at the 1.14 markup.
  • docs/vendored-libraries.md — one sentence, so the note on the Aristo stylesheet stays accurate.

Validation

Checked against the same page running the original jQuery UI 1.8 build, served side by side, comparing the rendered DOM and the measured geometry rather than the impression.

Element 1.8 original This branch
Add 73×33 72×33
Delete 87×33 88×33
Mind map menu 126×33 123×33
Help 76×33 76×33
Bold 23×22 23×22
A- 25×20 25×20
Zoom in 20×20 22×22
Colour swatch 22×22 22×22

The toolbar, its drop-down menu, the inspector, the navigator, the status bar and a modal dialog were all compared. Dialog buttons were verified by injecting the template-save markup that this repository's development page does not carry, since eXeLearning supplies the templates in the integrated editor.

npm test passes (13 cases) and npm run build succeeds.

Screenshots

The same page, before and after, from this repository's own development page.

Before — no icons, native controls, no zoom buttons, a checkbox glyph on the font styles:

Before

After:

After

jQuery UI 1.12 rebuilt the button widget, and the move to 1.14 took the
editor's appearance with it: a button no longer carries ui-state-default,
its label is a bare text node rather than a ui-button-text span, a buttonset
is a controlgroup, and the icons option was replaced by icon. The
Aristo-derived theme styles the 1.8 markup and the widgets were still being
asked for 1.8 options, so every button in the editor fell back to the
browser's own control, no icon was drawn anywhere, the navigator's zoom
buttons became invisible, and the font-style checkboxes grew the checkbox
glyph the checkboxradio widget draws by default.

The widget calls now pass the options 1.14 reads, and app.css re-aims the
theme's own declarations at the classes it emits. Measured against the same
page running the original jQuery UI 1.8 build, the toolbar, inspector,
navigator and dialogs come back within a pixel or two of where they were.

Nothing else is touched: no dependency changes, and the theme itself is
unmodified.
@erseco
erseco merged commit fda1ec2 into main Sep 19, 2026
6 checks passed
@erseco
erseco deleted the fix/jquery-ui-button-theme branch September 19, 2026 12:53
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