Skip to content

perf(sheet): fixing performance regression on modal sheets when expandToScroll is false #30267

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

Merged
merged 3 commits into from
Mar 19, 2025

Conversation

ShaneK
Copy link
Member

@ShaneK ShaneK commented Mar 18, 2025

Issue number: internal


What is the current behavior?

Currently, when a sheet is moved while expandToScroll is disabled, the DOM is queried excessively causing performance degradation.

What is the new behavior?

We now cache the targeted element in onStart and refer to it in onMove and onEnd, preventing over-querying the DOM

Does this introduce a breaking change?

  • Yes
  • No

Other information

This regression was introduced in #30257 and quickly highlighted by a member of the community

@ShaneK ShaneK requested a review from a team as a code owner March 18, 2025 18:06
@ShaneK ShaneK requested a review from thetaPC March 18, 2025 18:06
Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 6:29pm

@github-actions github-actions bot added the package: core @ionic/core package label Mar 18, 2025
@brandyscarney brandyscarney changed the title fix(sheet): fixing performance regression on modal sheets when expandToScroll is false perf(sheet): fixing performance regression on modal sheets when expandToScroll is false Mar 18, 2025
@brandyscarney
Copy link
Member

I created a dev build for device testing: 8.5.1-dev.11742393301.11cf5904

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested on iOS as well

@ShaneK ShaneK added this pull request to the merge queue Mar 19, 2025
Merged via the queue into main with commit c4b9212 Mar 19, 2025
61 checks passed
@ShaneK ShaneK deleted the FW-6396 branch March 19, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants