Skip to content

Initialization of interactions area on page load #423

Open
@jpolitz

Description

@jpolitz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions