Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
fix: React to config changes#7475
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
camdecoster 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.
This seems okay, but before I approve could you please provide a description and some steps to reproduce the issue? Then I can test before/after changes and see the fix in action.
emilykl commentedSep 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Never mind, just saw your comment in the PR description. In that case, would it make sense to open another issue which can be closed by this PR? |
emilykl 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.
Looks reasonable to me.
Call react again to ensure transitions are triggeredRemove obsolete references to configChanged
camdecoster commentedSep 3, 2025
Yes. I have a comment drafted about that, but never submitted it. 🤦 |
| layout:layout | ||
| }); | ||
| returnplotDone.then(()=>{ | ||
| if(!configChanged)gd.emit('plotly_react',{ config, data, layout}); |
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.
@camdecoster Is there a reason we don't want to emit aplotly_react event if the config changed?
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.
It will emit twice for one call toreact without that check. This is because we callnewPlot and thenreact again after that, all within the first call toreact.
4f7a513 intomasterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description
Use
newPlotif config has changed instead of_doPlotinsidePlotly.react.Closes#7551.
Supersedes#6395.
Changes
newPlotshould be usedTesting
Notes
gd.dataorgd.layout. For that reason, I don't think that this PR fixes the original issue inenable updating the config of a plot without changing other parameters #6394 so I'm not going to close that issue once this merges.