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
Xterm.js Option #1317
Xterm.js Option #1317
Conversation
I noted this over there was well, but I want to include the functionality from #1323 in this, so prioritizing that PR for the moment. |
2659890
to
0d1ac5a
Compare
for more information, see https://pre-commit.ci
|
Thank you so much for all the comments/notes @WebReflection ! I've addressed most of them, but the ones around the general approach using the CDN as well as guarding against what happens when a node gets moved around I've not yet addressed, so we can continue conversation on them. |
@JeffersGlass no problem and, if needed, I can help resolving |
@JeffersGlass it looks like there are too many unrelated files in here ... are you tackling the rebase or do you need any help with that? |
@WebReflection Yeah it looks like I screwed up the merge from main - just remerged (including the PR's from earlier today), it's back down to a much more reasonable 7 files changed. Haven't looked at your other responses yet, but I appreciate them! |
@JeffersGlass few comments / nits you can freely ignore if you think my opinion is not so relevant, otherwise this LGTM and thanks for working on it, it looks awesome! |
Thanks all! And especially thanks to you @WebReflection for the many rounds of revision and review, and really helping shape the API and naming of this. |
Adds a new options
xterm
to<py-config>
, which defaults to false. Ifxterm
is true, the xterm.js package is dynamically loaded and used as py-terminal, in place of the default <pre>-tag-with-formatting. This is ~400kb of additional transfer, so xterm.js is only fetched if this option is enabled.This PR is ready for review
This PR is a Work in Progress.To-do list is:Investigate xterm's auto-sizing function to make sure there are no hidden issues rendering on page loadAuto-fit addon is pretty buggy, not going to include itos.environ
to make common Python terminal utilities work "out of the box"rich._console = RichConsole(color_system="...")
cursesnot built/bundled with Pyodidevalidate()
function for plugin options #1323 is merged