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

Update modebar buttons when locale changes #2592

Merged
merged 1 commit into from
Apr 30, 2018
Merged

Conversation

alexcjohnson
Copy link
Collaborator

@alexcjohnson alexcjohnson commented Apr 29, 2018

Fixes #2484

@etpinard another quick one I didn't quite finish on bug day :)
FWIW it fixes not only the encouraged usage (Plotly.react) but also the old Plotly.plot call with new config.

@etpinard
Copy link
Contributor

Beautiful fix 💃

@alexcjohnson alexcjohnson merged commit c0b38da into master Apr 30, 2018
@alexcjohnson alexcjohnson deleted the modebar-locale-fix branch April 30, 2018 13:36
@vdgodse
Copy link

vdgodse commented May 21, 2021

@alexcjohnson Shouldn't it also check if event handlers were updated? Callbacks may need to be updated while using plotly with React hooks, so that it doesn't use stale values from the old closure. I ran into an issue where it seems like plotly is not updating the onClick handler for modebar buttons.

@alexcjohnson
Copy link
Collaborator Author

@vdgodse please file a new issue showing the misbehavior you've discovered, and we'll take a look. If at all possible, try to reduce it to plain javascript, ie Plotly.newPlot(...).then(...).then(() => Plotly.react(...)) as that's far easier to debug than issues inside a React build (and easier to share in Codepen or the like).

@vdgodse
Copy link

vdgodse commented May 24, 2021

Sure. I'll open an issue once I reduce it to plain javaScript.

@vdgodse
Copy link

vdgodse commented Jul 2, 2021

Sure. I'll open an issue once I reduce it to plain javaScript.

Update: Created an issue here along with codepen demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing locale does not update mode bar buttons labels
3 participants