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

feat: allow to user a termenv renderer on bubbletea middleware #132

Closed
wants to merge 8 commits into from

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Apr 12, 2023

this allows the bubbletea middleware to query the user terminal instead of using the server (or the default).

It'll also give the user a *lipgloss.Renderer which can be used with lipgloss directly, etc.

Tried to make it so it isn't a breaking change.

TODO:

  • write tests

Example is very based on @aymanbagabas & @meowgorithm work on https://github.com/charmbracelet/lipgloss/blob/master/examples/ssh/main.go

closes #71 #45
needs charmbracelet/bubbletea#720 charmbracelet/bubbletea#715

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 requested a review from meowgorithm April 12, 2023 19:00
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
bubbletea/tea.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #132 (f8f3f01) into main (a7e4853) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #132   +/-   ##
=======================================
  Coverage   76.14%   76.14%           
=======================================
  Files          17       17           
  Lines         897      897           
=======================================
  Hits          683      683           
  Misses        160      160           
  Partials       54       54           

@caarlos0
Copy link
Member Author

will wait muesli/termenv#122 before working more on this one

caarlos0 added 2 commits May 15, 2023 12:45
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member Author

depends on charmbracelet/bubbletea#739

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member Author

superseded by #197

@caarlos0 caarlos0 closed this Jan 17, 2024
@caarlos0 caarlos0 deleted the termenv-renderer branch January 17, 2024 02:20
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