PyZombis icon indicating copy to clipboard operation
PyZombis copied to clipboard

Add CodeLens to activities

Open reingart opened this issue 2 years ago • 1 comments

CodeLens is a step-by-step visual feature to show how a program works. See docs for an example: https://runestone.academy/ns/books/published/authorguide/directives/activecode.html

To enable the "Show CodeLens" button, please remove :nocodelens: argument in sections:

.. activecode:: function-example1
   :nocodelens:     <--- remove

   ....

Pages to enable CodeLens in:

  • https://pyar.github.io/PyZombis/main/lectures/TWP15/TWP15_3.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP15/TWP15_4.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP15/TWP15_5.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP15/TWP15_6.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP17/TWP17_4.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP18/TWP18_3.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP23/TWP23_3.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP23/TWP23_4.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP23/TWP23_6.html

  • https://pyar.github.io/PyZombis/main/lectures/TWP30/TWP30_2.html

reingart avatar Mar 23 '23 02:03 reingart

By activating the codelens button we get an embedded codelens directly from pythontutor.com, it does not use the native runestone codelens. This creates a dependency on the Internet, if you want to run Pyzombis locally without it. Another issue is that the visual dimensions of the activecode are not respected. For now, if we want to use codelens in these lectures, perhaps the best approach might be to manually add runestone's native codelens.


Image from PR #312 codelens_with_button_issue#236

NicolasSandoval avatar Mar 07 '24 02:03 NicolasSandoval