System: replaced the legacy Thickbox library with an AJAX-based modal window #1854
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.
Gibbon has used Thickbox for many years as it's solution for modal windows. With the addition of HTMX & Alpine, the whole Thickbox library can be removed with a couple small tweaks to the code.
This PR adds a global modal that can be triggered with HTMX to load content. It's styled with Tailwind and interactive through Alpine. The modal window uses the Alpine Focus plugin to ensure input focus and scrollbars are trapped in the modal when it is open.
The Thickbox script and style includes have been removed from index.php, and the
/lib
folder has been removed. For backwards compatibility, a section of code has been added to setup.js to convert all existing Thickbox links to use HTMX, which also includes any additional modules.Motivation and Context
Refactoring to replace all old jQuery libraries with more modern code.
How Has This Been Tested?
Locally.
Screenshots