Skip to content

fix: load header-fragment.js in main layout to enable nav dropdowns#448

Merged
YvesCesar merged 1 commit into
mainfrom
fix/load-header-fragment-js-in-main-layout
Jul 14, 2026
Merged

fix: load header-fragment.js in main layout to enable nav dropdowns#448
YvesCesar merged 1 commit into
mainfrom
fix/load-header-fragment-js-in-main-layout

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Problem

After the refactor in commit 8924435 (unify Features dropdown with Solutions mechanism), the old Bootstrap-based dropdown JS was removed from main.js. The new custom dropdown logic lives exclusively in header-fragment.js, which is only loaded by external fragment consumers (e.g. WordPress) — not by the static site itself.

As a result, the Solutions, Features, and language selector dropdowns stopped working on the static site.

Fix

Add header-fragment.js as a <script type="module"> tag in main.blade.php, alongside the existing main.js tag. This is safe because:

  • header-fragment.js is already a separate Vite entry point
  • Its code is wrapped in if (root) { ... } so it's a no-op if the header element is absent
  • Fragment consumers continue to load it independently via data-fragment-js

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://libresign.github.io/site-preview/pr-preview/pr-448/

Built to branch main at 2026-07-14 20:44 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@YvesCesar
YvesCesar merged commit 0770a84 into main Jul 14, 2026
5 checks passed
@YvesCesar
YvesCesar deleted the fix/load-header-fragment-js-in-main-layout branch July 14, 2026 20:56
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Starting production deploy of site header and footer fragments...

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.

2 participants