Skip to content

fix: dropdown and animated menus stay hidden on published pages - #478

Merged
tristan-mouchet merged 1 commit into
developfrom
fix/hidden-generated-scope-alerts
Jul 28, 2026
Merged

fix: dropdown and animated menus stay hidden on published pages#478
tristan-mouchet merged 1 commit into
developfrom
fix/hidden-generated-scope-alerts

Conversation

@tristan-mouchet

Copy link
Copy Markdown
Collaborator

Summary

Layers flagged hiddenGenerated were always forced to display: none, but only form alerts have a reveal mechanism that clears that inline style. Non-alert layers that carried the flag (e.g. animated dropdown/accordion menus in a nav bar) stayed permanently hidden, so their hover/click reveal animations ran on an invisible element and appeared broken. This scopes the hiding to alert layers only.

Changes

  • Gate the hiddenGenerateddisplay: none hiding on layer.alertType in all three render paths: LayerRendererPublic.tsx (published/preview), LayerRenderer.tsx (builder canvas), and lib/page-fetcher.ts (static HTML export)
  • Non-alert layers now manage their own visibility via the animation system's data-gsap-hidden attribute, which the reveal animation can clear

Why it's safe

  • Every legitimate hiddenGenerated producer is an alert and also sets alertType (form success/error alerts, password-form error alert); there is no non-alert producer
  • Alerts are unchanged: published mode still hides them via the separate alertType branch and reveals on submit; the builder alert preview toggle still works since alerts have alertType

Test plan

  • On a published page, a nav dropdown/accordion with a hover/click reveal animation shows on trigger
  • Submit a form with an error → error alert appears; with success → success alert appears
  • In the builder, toggling an alert's preview visibility still shows/hides it
  • Static export output keeps form alerts hidden by default

The hiddenGenerated flag forced display:none on every layer that
carried it, but the only mechanism that clears it (form submit JS)
runs for alerts. Non-alert layers that inherited the flag (e.g.
animated dropdown menus) stayed pinned to display:none because the
animation reveal only toggles data-gsap-hidden, never the inline
style. Gate the hiding on alertType so animation-driven reveals work.
@tristan-mouchet tristan-mouchet added the Bug Something isn't working label Jul 28, 2026
@tristan-mouchet tristan-mouchet added the Bug Something isn't working label Jul 28, 2026
@tristan-mouchet tristan-mouchet self-assigned this Jul 28, 2026
@tristan-mouchet
tristan-mouchet merged commit c52d77c into develop Jul 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant