fix: dropdown and animated menus stay hidden on published pages - #478
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Layers flagged
hiddenGeneratedwere always forced todisplay: 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
hiddenGenerated→display: nonehiding onlayer.alertTypein all three render paths:LayerRendererPublic.tsx(published/preview),LayerRenderer.tsx(builder canvas), andlib/page-fetcher.ts(static HTML export)data-gsap-hiddenattribute, which the reveal animation can clearWhy it's safe
hiddenGeneratedproducer is an alert and also setsalertType(form success/error alerts, password-form error alert); there is no non-alert produceralertTypebranch and reveals on submit; the builder alert preview toggle still works since alerts havealertTypeTest plan