feat(experiment): use chevron prompt for text inputs#399
Open
Conversation
zimeg
commented
Mar 15, 2026
Member
Author
zimeg
left a comment
There was a problem hiding this comment.
🔏 A few quick jots for the wonderful reviewers!
Comment on lines
-139
to
+149
| assert.Contains(t, view, "❱ Foo") | ||
| assert.Contains(t, view, style.Chevron()+" Foo") |
Member
Author
There was a problem hiding this comment.
🧱 note: Here we use the style functions to avoid unexpected behaviors between OS!
Comment on lines
-187
to
-209
| // SurveyIcons returns customizations to the appearance of prompts | ||
| func SurveyIcons() survey.AskOpt { | ||
| if !isStyleEnabled { | ||
| core.DisableColor = true | ||
| } | ||
|
|
||
| cursor := ">" | ||
| // Unfortunately "❱" does not display on Windows Powershell | ||
| // Limit "❱" to macOS until support is known for other operating systems | ||
| if isStyleEnabled && runtime.GOOS == "darwin" { | ||
| cursor = "❱" | ||
| } | ||
|
|
||
| // Customize the appearance of each survey prompt | ||
| return survey.WithIcons(func(icons *survey.IconSet) { | ||
| icons.SelectFocus.Text = cursor | ||
| icons.SelectFocus.Format = fmt.Sprintf("%d+b", blue) | ||
| icons.MarkedOption.Format = fmt.Sprintf("%d+b", blue) | ||
|
|
||
| icons.Question.Text = "?" | ||
| icons.Question.Format = fmt.Sprintf("%d+hb", gray) | ||
| }) | ||
| } |
Member
Author
There was a problem hiding this comment.
👜 note: This is moved to a shared theme file!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #399 +/- ##
==========================================
- Coverage 67.90% 67.89% -0.01%
==========================================
Files 218 218
Lines 18050 18054 +4
==========================================
+ Hits 12256 12258 +2
- Misses 4640 4642 +2
Partials 1154 1154 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
🐝 Adding chevron so to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Summary
This PR updates text inputs to prompt with a "chevron" icon for a nice and clean prompting experience 📺 ✨
Preview
Requirements