Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor header scroll handler #4793

Open
alizedebray opened this issue Feb 26, 2025 · 0 comments
Open

Refactor header scroll handler #4793

alizedebray opened this issue Feb 26, 2025 · 0 comments
Assignees
Labels
📦 components Related to the @swisspost/design-system-components package Header Everything related to our composible header components
Milestone

Comments

@alizedebray
Copy link
Contributor

alizedebray commented Feb 26, 2025

          Using `this.scrollParent` getter here would mean it is executed anytime you scroll 1px. Getting the scroll parent in the `connectedCallback`, or at least throttling it might be more efficient.

Originally posted by @alizedebray in #4786 (comment)


Currently the scroll handler is looping elements on every pixel scrolled which can have a big impact on performances.

@alizedebray alizedebray added 📦 components Related to the @swisspost/design-system-components package Header Everything related to our composible header components labels Feb 26, 2025
@alizedebray alizedebray moved this from 👀 Triage to 💻 Ready for development in Design System Production Board Feb 26, 2025
@alizedebray alizedebray added this to the PPNL Support milestone Feb 26, 2025
@alizedebray alizedebray self-assigned this Feb 27, 2025
@alizedebray alizedebray moved this from 💻 Ready for development to 🕹️ Coding in progress in Design System Production Board Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 components Related to the @swisspost/design-system-components package Header Everything related to our composible header components
Projects
Status: 🕹️ Coding in progress
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant