fix(ui): Bootstrap/Fomantic jQuery no-conflict + Bootstrap-component mobile rewrite (#719) #858

Merged
jmiller merged 2 commits from feat/mobile-retheme into dev 2026-07-21 19:52:19 +00:00
Owner

Follow-up to #857 (baseline drop-in). Two commits:

  • f5bf232 — critical fix. Dev verification of #857 surfaced TypeError: Cannot set properties of undefined (setting 'fullTextSearch') on load: Bootstrap 5's defineJQueryPlugin overwrote Fomantic's $.fn.{dropdown,modal,tab,collapse,…}, breaking Gitea's Fomantic init and aborting the client pipeline (dropdowns/modals broke, FAB never rendered). Adds vendor/bootstrap/noconflict.ts (imported right after the bundle) to hand those plugin names back to Fomantic via .noConflict(); Bootstrap's data-bs-* API keeps working.
  • e0e5f2f — Bootstrap-component mobile rewrite. Settings navbars (repo/user/org/admin) → Bootstrap .collapse drawer; 11 admin wide tables → .table-responsive; repo sub-nav → Bootstrap overflow utilities; mokogit-mobile.css slimmed to only the Gitea-selector fixes.

Note (unrelated, pre-existing): the dev login logo 404s (#819) — resolves when the .mokogit-auth-card login retheme (PR #823) lands.

https://claude.ai/code/session_01D5Zxu4xRRGoh9etzgShP4P

Follow-up to #857 (baseline drop-in). Two commits: - **`f5bf232` — critical fix.** Dev verification of #857 surfaced `TypeError: Cannot set properties of undefined (setting 'fullTextSearch')` on load: Bootstrap 5's `defineJQueryPlugin` overwrote Fomantic's `$.fn.{dropdown,modal,tab,collapse,…}`, breaking Gitea's Fomantic init and aborting the client pipeline (dropdowns/modals broke, FAB never rendered). Adds `vendor/bootstrap/noconflict.ts` (imported right after the bundle) to hand those plugin names back to Fomantic via `.noConflict()`; Bootstrap's `data-bs-*` API keeps working. - **`e0e5f2f` — Bootstrap-component mobile rewrite.** Settings navbars (repo/user/org/admin) → Bootstrap `.collapse` drawer; 11 admin wide tables → `.table-responsive`; repo sub-nav → Bootstrap overflow utilities; `mokogit-mobile.css` slimmed to only the Gitea-selector fixes. Note (unrelated, pre-existing): the dev login logo 404s (#819) — resolves when the `.mokogit-auth-card` login retheme (PR #823) lands. https://claude.ai/code/session_01D5Zxu4xRRGoh9etzgShP4P
jmiller added 2 commits 2026-07-21 19:51:58 +00:00
Convert the mobile-problem areas to real Bootstrap 5 components (drop-in already loaded):
- Settings navbars (repo/user/org/admin): wrap the Fomantic vertical menu in a Bootstrap
  .collapse .d-md-block drawer with a .d-md-none "Menu" trigger (data-bs-toggle=collapse).
  Chose collapse over offcanvas to avoid z-index races with the fixed FAB.
- Admin wide tables (11): .table-responsive so they scroll-contain instead of the page.
- Repo sub-nav (header.tmpl): Bootstrap .overflow-auto .flex-nowrap for the tab bar.
- mokogit-mobile.css: drop rules now handled by Bootstrap (table overflow, the hand-rolled
  settings rail); keep only Gitea-selector fixes Bootstrap can't reach (diff single-column
  collapse, issue-list column hiding, 44px touch targets, FAB clearance).

Additive template edits; all existing Fomantic classes preserved (desktop unchanged at md+).

Authored-by: Moko Consulting
Claude-Session: https://claude.ai/code/session_01D5Zxu4xRRGoh9etzgShP4P
fix(ui): restore Fomantic jQuery plugins after Bootstrap clobbers them (#719)
Generic: Project CI / Lint & Validate (pull_request) Successful in 35s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 14s
Generic: Project CI / Tests (pull_request) Successful in 32s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 53s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
f5bf2321de
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
jmiller merged commit a3f92d3890 into dev 2026-07-21 19:52:19 +00:00
Sign in to join this conversation.