Replies: 4 comments 7 replies
-
Ok, then for version 3.0 https://go.dev/blog/module-compatibility ;) |
Beta Was this translation helpful? Give feedback.
-
May I ask why you are planning to remove Regarding all the breaking changes. I'd say go for it! If people need this backwards compatibility, the README could simply link the features that are removed with v3, so people know which version to use. Given go uses tags for versions, changes can easily be backported via a separate branch anyway, in case any heavy bugs occur. |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to expose the Events channel directly? Are there any disadvantages to doing so?
This is a read-only channel because we probably don't want the user closing this channel. We use
We should consider using a
|
Beta Was this translation helpful? Give feedback.
-
Is there a roadmap? Any idea how long it will take until 3.0 comes out? I've read that the author of Vaxis would like to help with kitty/sixel/ modern TUI stuff. |
Beta Was this translation helpful? Give feedback.
-
I think it's time to start thinking about what tcell 3.0 might look like.
There are many changes I'd like to make, which require potentially breaking changes. It's time to discuss what those would be, and solicit feedback.
Key Encoding Changes
First off, we need to remove definitions for
KeyCtrl[A-Z]
etc. Those won't work well going forward because they overlap with other key definitions, and were based on compatibility of the ASCII encodings. These already don't work that way on Windows, but we have a serious problem where e.g. KeyCtrlH occupies the same encoding as KeyBackspace (these are aliases for each other). This happens with a few of these, and is a throw back to old style TTYs.I would discard the
KeyCtrlXXX
symbols altogether. Modified keys would be presented as such. For the times when we have an overlap of e.g. Ctrl-I is TAB, we would just report as TAB. On most modern terminals these would be unambiguously handled by the CSI-u encoding scheme proposed in #671. (This is already the case on Windows.)Retiring Termbox compatibility
The termbox compatibility layer is abandonware. People who want to convert to tcell gradually would be able to use version 2.x, but moving to 3.x they would need to actually update their code. I don't think many (if any) projects are actually using the termbox layer anyway. There are semantic shortcomings that would be difficult to overcome if we tried to keep this compatibility, and I don't think it's worth doing for termbox.
Retiring support for the legacy Windows console API
At least for output (not sure about input), the VT mode on Windows is vastly superior. This might hurt Windows versions before Windows 10. But Windows 8 is EOL.
Adopting modern Go.
We would move to probably Go 1.20 or newer. This could allow using generics for example, or possibly other things. We can't support the old versions of Go forever.
Removing the PollEvent based API.
This is probably controversial, and would require many (most) applications to change. The
PollEvent
API is awkward and not very idiomatic for Go. TheChannelEvents()
API (possibly with some refinement) would become "standard".PostEvent
andPostEventWait
especially need to be removed.Retire support for ancient terminals
I'm specifically talking about the ancient Wyse, TVI925, and similar. We simply don't see them in the wild, and we can't test them. While the idea of having good fallbacks and a rich terminal database was a worthy ideal, in practice it hasn't been useful, and keeping this support means we have bloated terminfo databases that nobody can use. Probably there are some other outliers, like beterm, that could be removed without much of anyone noticing.
Revisiting the API around SetContent, GetContent
Today these are use a single rune, and optional array of combining rules. It would be simpler by far to just make this a string. The rule is that the first fully composed glyph from the string would be displayed. Possibly we could actually give a feedback about how many bytes were consumed from the string.
Remove views framework
The "views" package was an early effort at building a widget set on top of tcell. It sort of works, but it's also sort of abandonware. There are others that have done a better job here. And maybe even views could move into its own package and be expanded separately.
Combining HideCursor, ShowCursor, SetCursorStyle somehow...
This API feels like it evolved organically -- it did -- and could probably be revisited in some way.
Retiring CharacterSet API
Nobody has ever used this I think. It does nobody any good. We need to remove it.
Summary
This is a lot of potential breaking change. But we could do it if we had a major release boundary. We'd need a migration guide of course. But I don't think that would be too hard to do.
Beta Was this translation helpful? Give feedback.
All reactions