treehousedev / treehouse

https://treehouse.sh
MIT License
154 stars 12 forks source link

add output and run button to CodeBlock view #313

Closed progrium closed 4 days ago

progrium commented 1 week ago

CodeBlocks are currently just containers to display source code, but we want to provide a way for CodeBlocks to optionally be executed by the defaultExecutor. For now we'll use canExecute to determine if it should have a Run button and output section, something like this mock:

Screenshot 2024-11-11 at 4 22 41 PM

Since execute is async, Run should update the output area with "Executing {language}..." until it returns with output.

lritter79 commented 1 week ago
Screenshot 2024-11-15 at 9 19 10 PM
lritter79 commented 1 week ago

Right now we dont care about support for specific language, just the UI. Test eith JS for now for functionality