-
Notifications
You must be signed in to change notification settings - Fork 605
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
Port UI to bubbletea #1385
Port UI to bubbletea #1385
Conversation
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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.
I don't see anything blocking, but main question about windows + bubbletea (maybe this is just a drop-in replacement and the idea is to enable TUI on windows in another PR?)
} | ||
|
||
// remove all whitespace padding from the end of the report | ||
reports = append(reports, strings.TrimRight(report, "\n ")+"\n") |
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.
Would this be best to just directly output the report, unchanged? Maybe there happen to be some weird whitespace requirements? (I noticed Syft was changed this way, too, and the same comment applies there, probably more applicable to Syft)
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.
This makes the sender of the report not responsible for how they should look when conjoined with potentially other reports. That is the responsibility of the receiver / UI itself.
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This is a follow up to anchore/syft#1888, allowing ingestion of the new syft bubbletea handler as well as porting grype to using bubbletea components as well.
This nudges grype in the right direction for the cmd package layout as well, following the new patterns in quill. In doing so, all current
cmd/*.go
sources have been moved tocmd/grype/cli/legacy/
.Note: one notable change here is that this enables support for the TUI on windows 🎉