8000 [2024.10.2] Terminal rendering issue with long text when using input() · Issue #2246 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

[2024.10.2] Terminal rendering issue with long text when using input() #2246

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

Closed
3 tasks done
JoshuaLowe1002 opened this issue Nov 12, 2024 · 5 comments · Fixed by #2254
Closed
3 tasks done

[2024.10.2] Terminal rendering issue with long text when using input() #2246

JoshuaLowe1002 opened this issue Nov 12, 2024 · 5 comments · Fixed by #2254
Labels
3rd party Errors coming from foreign projects we either enable or rely on needs-triage Issue needs triage type: bug Something isn't working

Comments

@JoshuaLowe1002
Copy link
Member
JoshuaLowe1002 commented Nov 12, 2024

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help

What happened?

When using a long string together with input(), if the text overflows because there is not enough space, the line shows in the terminal twice.

PyScript.com project to reproduce: https://pyscript.com/@joshualowe1002/sparkling-scene/latest?files=main.py

image

What browsers are you seeing the problem on? (if applicable)

No response

Console info

No response

Additional Context

No response

@JoshuaLowe1002 JoshuaLowe1002 added type: bug Something isn't working needs-triage Issue needs triage labels Nov 12, 2024
@JoshuaLowe1002 JoshuaLowe1002 8000 changed the title ]2024.10.2] Terminal rending issue with long text when using input() [2024.10.2] Terminal rending issue with long text when using input() Nov 13, 2024
@JoshuaLowe1002 JoshuaLowe1002 changed the title [2024.10.2] Terminal rending issue with long text when using input() [2024.10.2] Terminal rendering issue with long text when using input() Nov 14, 2024
@WebReflection WebReflection added the 3rd party Errors coming from foreign projects we either enable or rely on label Nov 18, 2024
@WebReflection
Copy link
Contributor

If you change py with mpy you won't see any issue, suggesting this is a readline issue because:

  1. py and mpy both use Xterm.js as terminal, but in mpy everything looks, and works, fine
  2. py, differently from mpy, uses readline ... maybe this is the time we say goodbye to that project and port over Pyodide whatever logic we used in MicroPython?

I can't estimate the effort right now as the repl, or input logic, is pretty different (ad-hoc in MicroPython, starting from its core abilities, delegated to readline in Pyodide)

@ntoll any thought around it? I think I might personally be happy to ditch readline dependency as a whole at this point, as recently it's causing more issues than it solves (but it's been very keen and nice to solve at least some issue we filed in there).

@fpliger
Copy link
Contributor
fpliger commented Nov 19, 2024

...

I think I might personally be happy to ditch readline dependency as a whole at this point, as recently it's causing more issues than it solves (but it's been very keen and nice to solve at least some issue we filed in there).

Feels like it'd be good to do some discovery to better estimate the effort to address this in a way that we can prioritize compared to other things that are lined up...

@nasrin1748
Copy link
Contributor

pyodide terminal adds a horizontal scroll bar for long text. Is it possible to add a horizontal scroll bar to the terminal instead of extending to next line?

@WebReflection
Copy link
Contributor
WebReflection commented Nov 20, 2024

@nasrin1748 please let's not add requests within an issue that's unrelated ... we need to fix it in a way that works like a terminal (no horizontal scrolls on a terminal, since its first appearance) ... requests should find their place in discussion with proper reasons, use cases, and whatnot, thanks.

@WebReflection
Copy link
Contributor

Published (until release) as https://cdn.jsdelivr.net/npm/@pyscript/core@0.6.20/dist/core.js and https://cdn.jsdelivr.net/npm/@pyscript/core@0.6.20/dist/core.css counter-part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party Errors coming from foreign projects we either enable or rely on needs-triage Issue needs triage type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0