feat(experiment): inline sample descriptions in plain text#400
feat(experiment): inline sample descriptions in plain text#400
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #400 +/- ##
==========================================
+ Coverage 67.90% 67.91% +0.01%
==========================================
Files 218 218
Lines 18050 18060 +10
==========================================
+ Hits 12256 12265 +9
Misses 4640 4640
- Partials 1154 1155 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
Notes and questions for the kind reader 🧠 💡
| Description: func(value string, index int) string { | ||
| return optionsForCategory[index].Description | ||
| }, |
There was a problem hiding this comment.
🔭 note: These descriptions aren't used for create selections so it's removed with these changes!
🪬 question: I notice samples does use descriptions and this causes outputs between "values" and "descriptions" different and am curious if we'd prefer to match that here?
slack-cli/cmd/project/create_template.go
Lines 34 to 99 in 2ad9485
| if desc := cfg.Description(opt, len(opts)); desc != "" { | ||
| key = opt + "\n " + desc | ||
| if desc := style.RemoveEmoji(cfg.Description(opt, len(opts))); desc != "" { | ||
| key = opt + " - " + desc |
There was a problem hiding this comment.
🐭 note: It'd be curious in a different separator but am unsure what reads best for most descriptions...
| Help string // Optional help text displayed below the select title | ||
| PageSize int // The number of options displayed before the user needs to scroll | ||
| Required bool // If a response is required | ||
| Template string // Custom formatting of the selection prompt |
There was a problem hiding this comment.
👾 note: I'm hoping to follow up with a refactor to move parts of iostreams/survey to a new iostreams/prompts package that separates these interfaces from the survey implementations.
🪓 ramble: And hoping alongside that we can move toward stable experiments:
| Template string // Custom formatting of the selection prompt | |
| Template string // DEPRECATED: Custom formatting of the selection prompt |
Changelog
Summary
This PR inlines sample descriptions in plain text for the
samplescommand and moves docs reference to help text and also removes emojis from descriptions to avoid output issues.Preview
Before
After
Requirements