-
Notifications
You must be signed in to change notification settings - Fork 1
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: show help text #138
feat: show help text #138
Conversation
This pull request has been linked to Shortcut Story #237655: figure out help text in setup wizard. |
9e9bbb6
to
5f4abe5
Compare
5f4abe5
to
501875d
Compare
@@ -22,6 +24,8 @@ const ( | |||
) | |||
|
|||
type chooseSDKModel struct { | |||
help help.Model | |||
helpKeys keyMap |
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.
The pattern here is to have each model define the help keys it shows. These are separate from the keys we handle when they're pressed since we don't necessarily want to show, eg. tab in the help text of the toggle flag model.
internal/quickstart/create_flag.go
Outdated
Back: key.NewBinding( | ||
key.WithKeys("esc"), | ||
key.WithHelp("esc", "back"), | ||
), |
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.
we can't go back on the input step here though - with the new success page we will be able to but is there a way to hide it when we should the textinput View?
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 removed "back" from the help text for create flag.
@@ -75,5 +92,5 @@ func (m toggleFlagModel) View() string { | |||
Padding(0, 1). | |||
MarginRight(margin) | |||
|
|||
return title + "\n\n" + toggleStyle.Render(toggle) + m.flagKey + furtherInstructions | |||
return title + "\n\n" + toggleStyle.Render(toggle) + m.flagKey + furtherInstructions + "\n\n" + helpView |
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.
the help text jumps after the the flag is toggled for the first time. I don't think there's an easy way to pad this to make sure that doesn't happen though 😞
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.
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.
sgtm!
Show help text for every step. We want to support going back for each step before merging this.
Also, we should try to fix the padding in the list of SDKs separate from this change.