You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
micro:bit CreateAI shows an iframe-embedded MakeCode after significant prior user interaction. So we have our own language menu (for a subset of the languages MakeCode supports) for all the UI prior to MakeCode.
We pass our language to MakeCode on the URL. This seems to be the only way to communicate it at the moment. We reload it when the language changes in CreateAI.
MakeCode's own language menu doesn't integrate with this scenario. It reloads MakeCode but the language stays unchanged.
I think what happens is that the URL always wins and MakeCode reloads on language change. So MakeCode updates its language cookie (e.g. from en to fr) then reloads, notices en is on the URL and copies en to the cookie again. We noticed this doesn't happen in local dev - in this case for us MakeCode concludes cookies aren't working and actually updates the URL before reload.
Describe the solution you'd like
Any reasonable approach that allows us to:
set an initial language (in a way that won't result in an extra load)
be able to change the MakeCode language from the embedding app
be notified when the user changes the language inside MakeCode (so we can update our preference and our own UI) and have that language change actually take effect in MakeCode
A really minimal fix could be a way to suppress the MakeCode language menu option. The embedding app could still offer MakeCode-only languages if desired (we do this in micro:bit classroom).
i think adding an editor message for this would be pretty niche, but i'm fine with suppressing the language option in the context menu. we could add a pxtarget flag and a query variant that flips it on
Is your feature request related to a problem? Please describe.
micro:bit CreateAI shows an iframe-embedded MakeCode after significant prior user interaction. So we have our own language menu (for a subset of the languages MakeCode supports) for all the UI prior to MakeCode.
We pass our language to MakeCode on the URL. This seems to be the only way to communicate it at the moment. We reload it when the language changes in CreateAI.
MakeCode's own language menu doesn't integrate with this scenario. It reloads MakeCode but the language stays unchanged.
I think what happens is that the URL always wins and MakeCode reloads on language change. So MakeCode updates its language cookie (e.g. from en to fr) then reloads, notices en is on the URL and copies en to the cookie again. We noticed this doesn't happen in local dev - in this case for us MakeCode concludes cookies aren't working and actually updates the URL before reload.
Describe the solution you'd like
Any reasonable approach that allows us to:
Describe alternatives you've considered
We considered some other options on microbit-foundation/ml-trainer#580.
A really minimal fix could be a way to suppress the MakeCode language menu option. The embedding app could still offer MakeCode-only languages if desired (we do this in micro:bit classroom).
CC @abchatra - as discussed this week
The text was updated successfully, but these errors were encountered: