-
Notifications
You must be signed in to change notification settings - Fork 95
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
Setting cli prompt width to the user's terminal width #8016
base: main
Are you sure you want to change the base?
Setting cli prompt width to the user's terminal width #8016
Conversation
Signed-off-by: Vishwanath Hiremath <[email protected]>
pkg/cli/prompt/text/text.go
Outdated
return Model{}, err | ||
} | ||
|
||
ti.Width = width |
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.
Do you know what the behavior is if we don't set the width? https://github.com/charmbracelet/bubbles/blob/master/textinput/textinput.go#L118
Does it autoscale?
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 agree that hardcoding is not the right thing.
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.
tested it by not setting the width and it automatically sets the width to teminal width and it autoscales as well. I am going to update the changes to remove the setting of width property.
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.
Great 👍 simple solutions are good.
Signed-off-by: Vishwanath Hiremath <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8016 +/- ##
==========================================
- Coverage 59.32% 59.31% -0.01%
==========================================
Files 560 560
Lines 37487 37495 +8
==========================================
+ Hits 22238 22242 +4
- Misses 13701 13706 +5
+ Partials 1548 1547 -1 ☔ View full report in Codecov by Sentry. |
pkg/cli/prompt/text/text.go
Outdated
@@ -148,7 +151,7 @@ func (m Model) View() string { | |||
view := &strings.Builder{} | |||
view.WriteString(m.prompt) |
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.
Do we need to implement wrapping for the prompt? or is that done automatically?
Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
Type of change
Fixes: #5467
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: