bczsalba / pytermgui

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
https://ptg.bczsalba.com
MIT License
2.25k stars 56 forks source link

[BUG] Cursor not visible in Splitter #106

Closed xezo360hye closed 1 year ago

xezo360hye commented 1 year ago

Describe the bug In elements placed inside Splitter (e.g. Splitter(InputField(...)), same applies to buttons and maybe other stuff) cursor is not displayed making text input extremely inconvenient

To Reproduce Steps to reproduce the behavior:

  1. Create some elements in Splitter
  2. Navigate to them (using mouse or arrow keys)

Expected behavior Cursor should be visible as it is in other elements e.g. in Container

Screenshots image image

System information

PyTermGUI version 7.3.0

System details:
    Python version: 3.10.9
    $TERM:          xterm-256color
    $COLORTERM:     truecolor
    Color support:  ColorSystem.TRUE
    OS Platform:    Linux-6.1.1-arch1-1-x86_64-with-glibc2.36
JWBWork commented 1 year ago

Also having issues with input fields inside splitter - missing cursor and I can't click on the input field to focus on that element

@bczsalba any updates on this bug? Issues with mouse input/selection of widgets in the splitter has been a big issue implementing this library for more complex layouts

bczsalba commented 1 year ago

@bczsalba any updates on this bug?

Hey there! Sorry I've gone a bit AWOL on the project recently, I mentioned it in some places but basically my entire life was taken up by a game development project I had for university. We handed the game in the other day, and after a bit of recovery I'll come back to PTG full(ish) time.

I expect the solution to this problem won't be fixing the splitter, but rather moving to a completely new type of layouting system that uses a modified Layout object that would essentially let you create layouts similar to what's possible in the window manager.

I have a sort of functioning version of it from months ago (before my interruption), but it turned out to be a lot more complicated than expected. I ended up having to rethink a lot of how widgets work, and 8.0.0 will likely contain a "new" base widget to replace what we currently have. I also accidentally created a possible fix for #81, but we'll see if that works out. The payoffs for the change will be huge, but it will still take a bit unfortunately.

TL;DR: Took a break, but coming back now. Working on a fix, but it may take a while. Thanks for holding out!

JWBWork commented 1 year ago

@bczsalba glad you're returning to it - best tui library I've used for python 👏🏻

bczsalba commented 1 year ago

Hey again, sorry about the delay! This issue was surprisingly hard to track down, but a more robust implementation of the positioned_line_buffer should have fixed it!

xezo360hye commented 1 year ago

Amazing! When will the next release arrive?

bczsalba commented 1 year ago

I'm planning to fix up the last couple of outstanding issues and then put out (what I think will be) 8.0.0. Shouldn't be too far, I'd estimate sometime this month.