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

Interactive widgets in inline mode appear "laggy" as of 0.56.2 #4403

Closed
davep opened this issue Apr 8, 2024 · 5 comments
Closed

Interactive widgets in inline mode appear "laggy" as of 0.56.2 #4403

davep opened this issue Apr 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@davep
Copy link
Contributor

davep commented Apr 8, 2024

Using 0.56.2, if you run up this code:

from textual.app import App, ComposeResult
from textual.widgets import Checkbox, Input


class InlineLagApp(App[None]):
    def compose(self) -> ComposeResult:
        yield Checkbox("Toggle this and note nothing happens")
        yield Input(
            placeholder="The above will update if you tab here, this will appear laggy to type into"
        )


if __name__ == "__main__":
    InlineLagApp().run(inline=True)

the application gives the feel of being "laggy". For example, run it up and then:

  • Press space on the Checkbox and notice it doesn't toggle.
  • After a while, tab to the Input and notice the Checkbox finally updates (moving the mouse can have the same effect).
  • Type into the Input and notice that it does refresh, but it's very laggy -- a keystroke takes a significant fraction of a second to appear.
@davep davep added the bug Something isn't working label Apr 8, 2024
@davep
Copy link
Contributor Author

davep commented Apr 8, 2024

Actually, I think this might be a bit more subtle that reported above. The above was experienced in kitty (0.33.1, macOS). If I try the same in iTerm (3.49.23, macOS) the Checkbox seems to behave/refresh fine, but typing into the Input still has the same laggy feel.

@davep
Copy link
Contributor Author

davep commented Apr 8, 2024

WezTerm (macOS) shows the same behaviour as kitty.

@willmcgugan
Copy link
Collaborator

Fixed in 0.56.3

Copy link

github-actions bot commented Apr 8, 2024

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@davep
Copy link
Contributor Author

davep commented Apr 8, 2024

Awesome, thanks. Looking fine in iTerm, although I'm still seeing some odd laggy behaviour with inputs in kitty (and to some extend in wez too). This feels like a slightly different issue though so I'll dig a bit deeper and raise a fresh issue if I can come up with something reproducible.

davep added a commit to davep/tinboard that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants