-
Notifications
You must be signed in to change notification settings - Fork 80
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!: v2 #392
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Carlos Alexandro Becker <[email protected]>
IS there a way to test this? I tried checking your go.mod and |
You could delete |
I also noticed that I needed to modify the bubbles alpha to get it to work otherwise I was getting all kinds of errors. I changed the go.mod from |
@tuxtlequino yes you'll need the entire v2 stack for most of them you can go get "github.com/charmbracelet/${LIB_NAME}/v2@v2-exp" |
@caarlos0 FYI |
Could you try the latest Wish v2-exp? |
@aymanbagabas thanks for fast response! Unfortunately no, tested with |
I was able to reproduce the issue where nothing gets rendered, and it appears that we need to inform Bubble Tea with the initial PTY requested size of the terminal. This PR adds the necessary options to Bubble Tea to do so charmbracelet/bubbletea#1314 diff --git a/bubbletea/tea_unix.go b/bubbletea/tea_unix.go
index 53c48d50d1ea..86153bfba2ae 100644
--- a/bubbletea/tea_unix.go
+++ b/bubbletea/tea_unix.go
@@ -33,6 +33,7 @@ func makeOpts(s ssh.Session) []tea.ProgramOption {
// best we can do ;)
tea.WithColorProfile(colorprofile.Env(envs)),
tea.WithEnvironment(envs),
+ tea.WithInitialSize(pty.Window.Width, pty.Window.Height),
}
}
@@ -44,5 +45,6 @@ func makeOpts(s ssh.Session) []tea.ProgramOption {
tea.WithInput(pty.Slave),
tea.WithOutput(pty.Slave),
tea.WithEnvironment(envs),
+ tea.WithInitialSize(pty.Window.Width, pty.Window.Height),
}
} EDIT: for the rendering artifacts issue, could you provide a minimal reproducible example? |
Uh, there are private fields, seems that waiting for merge.. I have subscribed. About MRE, it's hard, even if I could give you this program, it's still required our private server to response something.. I will try create something, but if you come up with something faster, then be sure to response. |
@aymanbagabas do you have something with high FPS? With constants ticks of spinner for ex., so there are often Update/View cycles. Run such program and just resize it activly, and you should found artifacts, it's like currupted buffer in some frames.I reproduce it very well. Update: |
@aymanbagabas Eureka, I have reporoduced it from scratch! It all cause of lipgloss.Width equals to real width, so when all lines are idially filled, fully, then some problems are happen - something is being moved to the next line for some reason.. And this really only happens when you run it through wish (https://pastebin.com/Ze5twBLv), version with direct run (https://pastebin.com/UvFhGsgt). It's examples/bubbletea/main.go from v2-exp, just run it, connect and start activly resize terminal window - you must see wrong identation of help string bellow the list, it will bounce. |
No description provided.