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

Always copy code and output when changing new language #15

Closed
wants to merge 1 commit into from

Conversation

narrator0
Copy link
Contributor

This attempts to resolve #11. I change to plugin to always copy the previous code and output to the new Thebelab instance. I think the sample code is not important at all. We should move whatever code and output to the new instance. @celine168 let me know what you think.

@narrator0 narrator0 requested a review from celine168 December 28, 2019 23:12
Copy link
Contributor

@celine168 celine168 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this works. Another possibility I was thinking was to keep the sample code if they haven't edited the code input box yet, and if they already have, then keep the code inside. I'm not sure which option is better. What's your opinion?

@narrator0
Copy link
Contributor Author

I also thought about that option. But this will require we have somewhere to store whether the code is dirty or not. In which we are only passing in a config dictionary to create the dialog. I'm not sure where can could store this information? And since I think this approach is also valid, I chose the easier approach.

@narrator0 narrator0 force-pushed the fix/change-language-after-input-code branch from d8761f0 to 34d3163 Compare December 29, 2019 06:04
@narrator0
Copy link
Contributor Author

@celine168 I think we can merge this. The sample code is not necessary since the author is going to delete it and remove it anyway. I think keep the code is the best solution.

@narrator0
Copy link
Contributor Author

I looked at the implementation myself. I think we should still keep the sample code since we made the starting language dynamic in #24. As there are a lot of commits to master after this PR that make this branch now have conflicts with master. I suggest rewrite the code and reopen another PR.

@narrator0 narrator0 closed this Feb 2, 2020
@TimStewartJ TimStewartJ deleted the fix/change-language-after-input-code branch June 27, 2021 16:15
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

Successfully merging this pull request may close these issues.

Changing the language changes code input to "Hello world!" each time
2 participants