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

Add new BubbleTea TUI renderer #665

Merged
merged 3 commits into from
Dec 7, 2024
Merged

Conversation

egibs
Copy link
Member

@egibs egibs commented Nov 26, 2024

This PR adds a new, separate terminal renderer that leverages BubbleTea for a more interactive experience that can be accessed via --format tui. I also tweaked the normal terminal output to add additional color highlighting to strings.

This new renderer allows for scrolling/keyboard navigation within the viewport as well as searching for specific strings.

There are likely some small bugs in the implementation (e.g., boxes rendering incorrectly if the terminal window is too small), but for the most part it works as expected for analyze, diff, and scan.

The main caveat when using this renderer is that [most] errors will be ignored to prevent breaking the interface.

@egibs egibs requested a review from tstromberg November 26, 2024 14:24
@tstromberg
Copy link
Collaborator

tstromberg commented Dec 2, 2024

What do you think about naming this renderer "interactive"? Technically the other renderers are TUI's as well.

@tstromberg
Copy link
Collaborator

(approved, other than the renderer name and new merge conflicts)

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
egibs added 2 commits December 6, 2024 18:36
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs merged commit 6d0a8e4 into chainguard-dev:main Dec 7, 2024
8 checks passed
@egibs egibs deleted the bubble-tea branch December 7, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants