-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Copy link
Labels
📦 componentsRelated to the @swisspost/design-system-components packageRelated to the @swisspost/design-system-components package
Milestone
Description
Based on #6042.
-
Enforce separation of concerns between the post-menu and the post-popovercontainer:
→ The post-popovercontainer should know about its own state and emit events when it changes.
→ The post-menu should only react to the events.
→ There should be an extra payload {first: boolean} in the post-popovercontainer events.
→ Instead of having a requestAnimationFrame in the post-menu, there should be a postToggled event in the post-popovercontainerThe post-popovercontainer events would then be:
postShowBefore content becomes visible (animation not started yet).postShownAfter content is fully visible (animation ended).postHideBefore content starts hiding (animation not started yet).postHiddenAfter content is fully hidden (animation ended).postToggleBefore visibility is toggled (animation not started yet).postToggledAfter visibility toggle is complete (animation ended).
And all these event would have a payload of type {first: boolean}.
- addEventListener must be avoided whenever possible
→ The post-menu should react to the postRendered event with a onPostRendered update in the renderer
→ Same for the onPostToggle or onPostToggled
Metadata
Metadata
Assignees
Labels
📦 componentsRelated to the @swisspost/design-system-components packageRelated to the @swisspost/design-system-components package
Type
Projects
Status
🧐 In Review