Restore the editor's look on jQuery UI 1.14 - #18
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aui-button-textspan, a buttonset is a controlgroup, and theiconsoption was replaced byicon.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
checkboxradiowidget 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.cssre-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.js—icons: { primary }becomesicon. The menu's drop-down arrow was the secondary icon, which 1.12 removed, so it is appended by hand.Navigator.js—text: falsebecomesshowLabel: false, andiconsbecomesicon, which is what makes the zoom buttons visible again.Inspector.js— the font-style checkboxes are initialised withicon: 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.
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-savemarkup that this repository's development page does not carry, since eXeLearning supplies the templates in the integrated editor.npm testpasses (13 cases) andnpm run buildsucceeds.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:
After: