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

Initialization of interactions area on page load #423

Open
jpolitz opened this issue Feb 10, 2022 · 1 comment
Open

Initialization of interactions area on page load #423

jpolitz opened this issue Feb 10, 2022 · 1 comment

Comments

@jpolitz
Copy link
Member

jpolitz commented Feb 10, 2022

Currently, interactions loads in a context that doesn't match anything users expect – it has num-max and other global builtins, but not images or other important libraries in essentials. Clicking “Run” puts interactions into the context of definitions.

This is jarring when students try to, for example, make a circle after creating a new program.

For context, some simple non-solutions are:

  • Auto-running programs on page load. This is just too fraught with all the behavior a program can have to be safe or sensible to do automatically.
  • Completely disabling interactions until first run. Bootstrap training (and other 1st day activities) dive right into interactions with numbers and arithmetic, and we can't rewrite/find all hard copies of that material to update it, and first days are fragile.

Instead, we propose:

  • For brand-new programs and direct visits to https://code.pyret.org/editor, interactions starts with use context essentialsNNNN loaded.
  • For #share and #program links, interactions is disabled on page load until the first run. Interactions is grayed out with a message that points an arrow towards the Run button to guide students to click on that; after this interactions functions as usual.
@asolove
Copy link
Contributor

asolove commented Feb 10, 2024

Quite possibly this is silly, but: is there not any way to tell what context the program would run in without fully running it?

I know we can't get the actual effect of the definitions in the program area, but I would have thought we could parse the program and tell if it has a use context or not. That would let us make this work uniformly for #share/#program cases, too.

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

No branches or pull requests

2 participants