Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] investigate using codapi #5626

Open
hexylena opened this issue Dec 9, 2024 · 0 comments
Open

[feature request] investigate using codapi #5626

hexylena opened this issue Dec 9, 2024 · 0 comments
Milestone

Comments

@hexylena
Copy link
Member

hexylena commented Dec 9, 2024

the UX is pretty decent (ignore the not actually fibbonaci function, it's just an example) but by adding a <codapi-snippet/> block after ever pre we can get runnable code.

This would work nicely for python and SQL tutorials potentially.

```python                                                                              
def fib(n):                                                                            
    if n < 2:                                                                          
        return 1                                                                       
    else:                                                                              
        return n + fib(n - 1)                                                          
                                                                                       
print(fib(10))                                                                         
```                                                                                    
                                                                                       
<codapi-snippet engine="wasi" sandbox="python" editor="basic"></codapi-snippet>        

produces

Screenshot 2024-12-09 at 15-00-44 Debugging

with the benefit that it's directly in-page editable. we'd need to see about sharing state between the different boxes.

it's an idea. the jupylite experience kinda sucks, and this'd be better by far.

@hexylena hexylena added this to the Next Grant milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant