fix(ui): Bootstrap/Fomantic jQuery no-conflict + Bootstrap-component mobile rewrite (#719) #858
Reference in New Issue
Block a user
Delete Branch "feat/mobile-retheme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #857 (baseline drop-in). Two commits:
f5bf232— critical fix. Dev verification of #857 surfacedTypeError: Cannot set properties of undefined (setting 'fullTextSearch')on load: Bootstrap 5'sdefineJQueryPluginoverwrote Fomantic's$.fn.{dropdown,modal,tab,collapse,…}, breaking Gitea's Fomantic init and aborting the client pipeline (dropdowns/modals broke, FAB never rendered). Addsvendor/bootstrap/noconflict.ts(imported right after the bundle) to hand those plugin names back to Fomantic via.noConflict(); Bootstrap'sdata-bs-*API keeps working.e0e5f2f— Bootstrap-component mobile rewrite. Settings navbars (repo/user/org/admin) → Bootstrap.collapsedrawer; 11 admin wide tables →.table-responsive; repo sub-nav → Bootstrap overflow utilities;mokogit-mobile.cssslimmed to only the Gitea-selector fixes.Note (unrelated, pre-existing): the dev login logo 404s (#819) — resolves when the
.mokogit-auth-cardlogin retheme (PR #823) lands.https://claude.ai/code/session_01D5Zxu4xRRGoh9etzgShP4P
Bootstrap 5 still registers jQuery plugins (defineJQueryPlugin) when jQuery is present, overwriting $.fn.{dropdown,modal,tab,collapse,tooltip,...} — the same names Fomantic-UI owns. That made $.fn.dropdown.settings undefined, so Gitea's Fomantic init threw "Cannot set properties of undefined (setting 'fullTextSearch')" and aborted the whole client init pipeline (dropdowns/modals/tabs broke; the FAB never rendered). Add vendor/bootstrap/noconflict.ts (imported right after the bundle) that calls each colliding plugin's .noConflict() to hand the name back to Fomantic. Bootstrap's data-bs-* API stays functional (it's bound to document events, not the jQuery interface), so the mobile collapse drawers still work. Verified via dev deploy: the drop-in built green but the login page surfaced the uncaught fullTextSearch error + missing FAB; this restores Fomantic. Authored-by: Moko Consulting Claude-Session: https://claude.ai/code/session_01D5Zxu4xRRGoh9etzgShP4P