source-academy / modules

Modules that can be imported by programs in Source Academy, an online experiential environment for computational thinking
Apache License 2.0
8 stars 29 forks source link

Mobile Workspace: Module tab reloading on each keystroke in editor #168

Closed martin-henz closed 1 year ago

martin-henz commented 1 year ago

Expected Behavior

Editor keystrokes should not affect module loading.

Current Behavior

Currently each editor keystroke reloads the currently loaded modules.

Steps to Reproduce

1) Load: https://share.sourceacademy.org/oxhil 2) press run 3) open the runes tab 4) start typing in editor

you will see that each keystroke restarts the animation.

Context

This is a critical issue in modules. Fixing it is necessary for current CS1101S.

ianyong commented 1 year ago

Fixed the desktop workspace through the use of memoization in https://github.com/source-academy/frontend/pull/2331, but the mobile workspace still has this issue because the mobileControlBarProps being passed into it is constantly updating (thus making memoization ineffective). Possibly need to either memoize more components/variables in the code or refactor such that the side content tabs are not re-rendered when the control bar re-renders.

martin-henz commented 1 year ago

Reopening after renaming: The problem persists for mobile workspace, see https://github.com/source-academy/frontend/pull/2331

martin-henz commented 1 year ago

The issue should move to frontend

martin-henz commented 1 year ago

Closed in favor of: https://github.com/source-academy/frontend/issues/2332