Skip to content

feat(experiment): inline sample descriptions in plain text#400

Merged
zimeg merged 2 commits intomainfrom
zimeg-feat-charm-sample-description
Mar 17, 2026
Merged

feat(experiment): inline sample descriptions in plain text#400
zimeg merged 2 commits intomainfrom
zimeg-feat-charm-sample-description

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Mar 15, 2026

Changelog

Nothing for this time 🍀 ✨

Summary

This PR inlines sample descriptions in plain text for the samples command and moves docs reference to help text and also removes emojis from descriptions to avoid output issues.

Preview

Before

before

After

after

Requirements

@zimeg zimeg added this to the Next Release milestone Mar 15, 2026
@zimeg zimeg self-assigned this Mar 15, 2026
@zimeg zimeg requested a review from a team as a code owner March 15, 2026 04:53
@zimeg zimeg added enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment labels Mar 15, 2026
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@2ddf970). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/project/create_samples.go 40.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage        ?   67.98%           
=======================================
  Files           ?      218           
  Lines           ?    18068           
  Branches        ?        0           
=======================================
  Hits            ?    12284           
  Misses          ?     4631           
  Partials        ?     1153           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes and questions for the kind reader 🧠 💡

Comment on lines -135 to -137
Description: func(value string, index int) string {
return optionsForCategory[index].Description
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔭 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?

func getSelectionOptions(clients *shared.ClientFactory, categoryID string) []promptObject {
if strings.TrimSpace(categoryID) == "" {
categoryID = "slack-cli#getting-started"
}
// App categories and templates
templatePromptObjects := map[string]([]promptObject){
"slack-cli#getting-started": []promptObject{
{
Title: fmt.Sprintf("Bolt for JavaScript %s", style.Secondary("Node.js")),
Repository: "slack-samples/bolt-js-starter-template",
},
{
Title: fmt.Sprintf("Bolt for Python %s", style.Secondary("Python")),
Repository: "slack-samples/bolt-python-starter-template",
},
},
"slack-cli#automation-apps": {
{
Title: fmt.Sprintf("Bolt for JavaScript %s", style.Secondary("Node.js")),
Repository: "slack-samples/bolt-js-custom-function-template",
},
{
Title: fmt.Sprintf("Bolt for Python %s", style.Secondary("Python")),
Repository: "slack-samples/bolt-python-custom-function-template",
},
{
Title: fmt.Sprintf("Deno Slack SDK %s", style.Secondary("Deno")),
Repository: "slack-samples/deno-starter-template",
},
},
"slack-cli#ai-apps": {
{
Title: fmt.Sprintf("Bolt for JavaScript %s", style.Secondary("Node.js")),
Repository: "slack-samples/bolt-js-assistant-template",
},
{
Title: fmt.Sprintf("Bolt for Python %s", style.Secondary("Python")),
Repository: "slack-samples/bolt-python-assistant-template",
},
},
}
return templatePromptObjects[categoryID]
}
func getSelectionOptionsForCategory(clients *shared.ClientFactory) []promptObject {
return []promptObject{
{
Title: fmt.Sprintf("Starter app %s", style.Secondary("Getting started Slack app")),
Repository: "slack-cli#getting-started",
},
{
Title: fmt.Sprintf("AI Agent app %s", style.Secondary("Slack agents and assistants")),
Repository: "slack-cli#ai-apps",
},
{
Title: fmt.Sprintf("Automation app %s", style.Secondary("Custom steps and workflows")),
Repository: "slack-cli#automation-apps",
},
{
Title: "View more samples",
Repository: viewMoreSamples,
},
}
}

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐭 note: It'd be curious in a different separator but am unsure what reads best for most descriptions...

Copy link
Contributor

@srtaalej srtaalej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selection and code looks a lot cleaner 🙌 thanks for making these updates ❤️
i will say though the inline description with "-" feels a bit dense visually — especially when scanning a longer list.
i think itd be worth it to explore (in a followup pr) a subtler separator or dimming the description text to create more visual hierarchy between the option name and its description 🤔

Screenshot 2026-03-16 at 2 17 41 PM

@zimeg
Copy link
Member Author

zimeg commented Mar 17, 2026

@srtaalej Super appreciate the kind review! I do agree it's dense but we might merge this with line wraps supported well too.

Do of course share follow up to formatting more in upcoming change! 🍀 ✨

linebreak

@zimeg zimeg merged commit 02aae5f into main Mar 17, 2026
8 checks passed
@zimeg zimeg deleted the zimeg-feat-charm-sample-description branch March 17, 2026 04:04
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement

suggestion: The survey prompts use a nice style where the description is grey. Visually, it's easy to separate the Option ("Starter App") from Description ("Some description about the app"). This update loses the grey text, which makes it a lot harder to distinguish what the option is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants