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

config option will reset the url #3344

Open
wwj718 opened this issue Apr 18, 2024 · 5 comments
Open

config option will reset the url #3344

wwj718 opened this issue Apr 18, 2024 · 5 comments
Assignees

Comments

@wwj718
Copy link

wwj718 commented Apr 18, 2024

before adding config option

    new IDE_Morph().openIn(world);
image

the url is https://127.0.0.1:8000/snap.html#run:http://wwj718.github.io/post/img/snap-eclipse.xml

After adding config option:

    new IDE_Morph({lang: "zh_CN", noCloud: true}).openIn(world);
image

The content after the hashtag in the URL will disappear: https://127.0.0.1:8000/snap.html#

@jmoenig jmoenig self-assigned this Apr 18, 2024
@jmoenig
Copy link
Owner

jmoenig commented Apr 18, 2024

Thank you! I'll investigate...

@jmoenig
Copy link
Owner

jmoenig commented Apr 24, 2024

hmm... this seems to be a somewhat "hairy" issue. I'm seeing a bunch of complicated tweaks from people who feel strongly about using Snap in their localized versions, and I'm afraid to touch them. I'm not even sure if this behavior might not have been introduced by someone on purpose...

@wwj718
Copy link
Author

wwj718 commented Apr 25, 2024

Thank you for your investigation!

I'm not sure if it's a feature or a bug. I encountered the following complaints from users:

  1. After refreshing browser(Want to return to the original state of the project), it will no longer be the previous project.
  2. Unable to share the project to others with the url

@cycomachead
Copy link
Collaborator

Late to this party, but we do need to re-work this code.

I think these two requests are valid. The confusion/concern with languages is that when someone is given a URL that specifies a language, a user might want to change their language and not have to re-change it if they refresh the page.

@jmoenig
Copy link
Owner

jmoenig commented Jul 10, 2024

Michael, this is a special case where they configure the Snap index page with settings we've introduced for embedding the editor into online courses etc. (Bootstrap / Pyret, the UoC people etc.). In this particular case they could just switch the normal off-the-shelf Snap to their language and it would totally stay that way. I agree that we should rework this code, but - as mentioned above - I know that what makes it hairy has been touched a a lot of people with very strong interests in localization, and I'm afraid that we'd break existing real-life use cases when trying to adjust this for the special configuration settings.

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

No branches or pull requests

3 participants