-
Notifications
You must be signed in to change notification settings - Fork 4k
[fix] st.fragment interaction with st.{balloons,snow} #11015
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
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
✅ PR preview is ready!
|
74938ca to
5b91359
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes the issue where re-runs in st.fragment caused st.balloons and st.snow to reappear unexpectedly. The changes update the ElementNodeRenderer to pass the scriptRunId from node instead of props and add comprehensive end-to-end tests (for both snow and balloons) along with shared animation utilities to verify the correct behavior.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/lib/src/components/core/Block/ElementNodeRenderer.tsx | Updates the scriptRunId prop passed to Balloons and Snow components to use node.scriptRunId for proper fragment interaction. |
| e2e_playwright/st_snow_with_fragment_interactions_test.py | Adds tests to verify that st.snow behaves as expected with fragment re-runs and full page re-runs. |
| e2e_playwright/st_snow_with_fragment_interactions.py | Defines a test component triggering st.snow through a fragment to support the new behavior. |
| e2e_playwright/st_balloons_with_fragment_interactions_test.py | Adds tests to confirm that st.balloons does not reappear after fragment re-runs and reappears on full page re-run. |
| e2e_playwright/st_balloons_with_fragment_interactions.py | Defines a test component triggering st.balloons through a fragment to support the new behavior. |
| e2e_playwright/shared/animation_utils.py | Provides shared utilities for validating the onscreen/offscreen state of animations for use in the tests. |
5b91359 to
cdfe543
Compare
sfc-gh-pchiu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG!
Describe your changes
st.fragmentre-runs would causest.{balloons,snow}to show up again.GitHub Issue Link (if applicable)
Fixes #10961
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.