Open TomBinford opened 1 year ago
The hiding problem comes from CreatePythonDoc
at https://github.com/uclaacm/TeachLAFrontend/blob/aad5874f0a08730ce8d2e28a795b167409b91ccf/src/util/languages/Python.js#L3 It only takes one parameter for the source code, while the caller at https://github.com/uclaacm/TeachLAFrontend/blob/aad5874f0a08730ce8d2e28a795b167409b91ccf/src/components/Output/Output.js#L74 passes the showConsole
parameter that should be respected.
This likely comes down to us telling the Skulpt interpreter to output directly to the div with id="inner"
, which we aren't controlling the visibility of.
Hopefully the fix is as simple as adjusting CSS visibility in CreatePythonDoc
depending on the showConsole
parameter; see an example at
https://github.com/uclaacm/TeachLAFrontend/blob/aad5874f0a08730ce8d2e28a795b167409b91ccf/src/util/languages/React.js#L61-L63
print('a')
Clicking "Run" at any point changes the output to a single line as expected.