-
Notifications
You must be signed in to change notification settings - Fork 9
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
Looser coupling with vt100 #152
Conversation
Thank you for the pr!
If needed we can add it. Maybe it makes sense to keep backwards compatibility? Though again I wouldn't focus too much on that yet.
The changes are clear, and the generics are tested by the impl.
I am happy with the current state, but I do invite you to sketch that a little more out in a comment, if you want - so we can look at it in a little more detail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
pending the doc comments.
And if desired a discussion about: &dyn Screen
To avoid needing a
Feels less than ideal since that would require the
|
Thank you for that sketch and explanation! Unless you have more input or ideas I would merge this PR, if you are happy with it. |
I feel similarly
I'm happy with the state of the PR |
Thank you :). |
### Description In order to properly persist a task's output we need to display the full terminal contents including whatever might be in the scrollback buffer. This PR adds an alternative screen where the row index includes the scrollback rows. The `Screen` trait added in a-kenji/tui-term#152 will be implemented for `EntireScreen` allowing for us to use this structure with the `PseudoTerminal` widget. ### Testing Instructions Added some basic unit tests to verify that scrollback gets printed. Closes TURBO-2592
### Description a-kenji/tui-term#152 allowed for the widget to be used with any library that implements the `Screen` trait. This PR switches us to use our vendored vt100 crate as the backend for the terminal widget. If desired should be easy to review each commit individually. ### Testing Instructions `cargo run -p turborepo-ui --example pane` and verify that colors looks nice Closes TURBO-2623
Addresses #150
Adds a generic
Screen
andCell
traits that opens the possibility of usingtui-term
with libraries other thanvt100
.This is a breaking change in a few ways:
PseudoTerminal
now contains a generic.PseudoTerminal::new(&parser.screen())
will fail. This could be avoided with aimpl<'a> Screen for &'a vt100::Screen
, but wasn't sure this was desired. Will add it if desired.Please let me know if there's additional tests that would be beneficial.
Alternatives:
We could try to avoid leaking the underlying
Screen
type by storing a&dyn Screen
, but that would require reworking the interface to not have an associated type.