Skip to content

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented Apr 29, 2025

CHANGELOG

Replaces feedback --name platform-improvements with feedback --name slack-platform as the flag name for Slack Platform support. You can continue to use --name platform-improvements until the next major version release.

Summary

This pull request replaces feedback --name platform-improvements with feedback --name slack-platform:

  • Deprecates feedback --name platform-improvements
  • Removes platform-improvements from the help documentation
  • Adds feedback --name slack-platform
  • Backwards compatible with --name platform-improvements continues to work until the next semver:major update

Preview

slack feedback --help displays slack-platform:

image

slack feedback --name slack-platform:

image

slack feedback --name platform-improvements is backwards compatible:

image

slack feedback --name platform-improvements --verbose deprecation message:

image

Reviewers

# Test Help
$ slack feedback --help
# → Confirm the option "slack-platform" exists
# → Confirm the option "platform-improvements" does not exist

$ slack feedback --name slack-platform
# → Should prompt to open the browser

$ slack feedback --name platform-improvements
# → Should prompt to open the browser

$ slack feedback --name platform-improvements --verbose
# → Confirm DEPRECATED message

Requirements

@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Apr 29, 2025
@mwbrooks mwbrooks added this to the Next Release milestone Apr 29, 2025
@mwbrooks mwbrooks self-assigned this Apr 29, 2025
@codecov
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.18%. Comparing base (9bb1d69) to head (06e247e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   63.00%   63.18%   +0.17%     
==========================================
  Files         210      210              
  Lines       22183    22187       +4     
==========================================
+ Hits        13976    14018      +42     
+ Misses       7115     7082      -33     
+ Partials     1092     1087       -5     

☔ 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

@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.

🚩 Some comments to guide the review and help answer a few open questions!

Comment on lines +71 to +73
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
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: Added a DEPRECATED(semver:X) comment to make this easier to find in the future. We are a little consistent with our deprecation comments - TODO(semver:major) and others also exist. Preference?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for both this comment and calling out the formatting!

IIRC we are using TODO(semver:major) more often, but this is often for internal breaking changes AFAICT.

I think DEPRECATED is meaningful here since it captures the ongoing support with an existing alternative option, but IMO the semver:major part is the most important! This is what I would use in searching for these 😉

Copy link
Member

Choose a reason for hiding this comment

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

Also I learned in review of #71 that go has a convention around making machine-readable comments that I'm interested in exploring:

...this comment directives are line comments that start with //go:, with no space between the // and the go:.

https://go.dev/wiki/Comments#directives

Using a similar pattern might be interesting for these more "conventional" comments, but I don't believe we have explicit notes on how these should be used overall...

Copy link
Member

Choose a reason for hiding this comment

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

One addition to this comment might also note the deprecated suggestions? 📚

Edit: I realize you make a similar comment a few lines down - no blocker here!

Suggested change
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major) - Replaced with the "slack-platform" option

Copy link
Member Author

Choose a reason for hiding this comment

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

The //go: directive is interesting. It led me down a path to find the use of the // DEPRECATED: comment in Golang. So, perhaps we can start to use that convention to signal deprecated code. I definitely agree that the (semver:major) scope is most important though!

clients.IO.PrintInfo(ctx, false, fmt.Sprintf(
"%s\n%s\n",
style.Secondary("Ask questions, submit issues, or suggest features for the SLack CLI:"),
style.Secondary("Ask questions, submit issues, or suggest features for the Slack CLI:"),
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: Writing tests found a typo!

Copy link
Member

Choose a reason for hiding this comment

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

@mwbrooks Whew great catch! It's nice to know this wasn't released, but darn that's an L for sure 😉

Comment on lines 246 to 251
// DEPRECATED(semver:major): Support the deprecated survey name for backwards compatibility
if surveyNameFlag == SlackPlatformFeedbackDeprecated {
surveyNameFlag = SlackPlatformFeedback
clients.IO.PrintDebug(ctx, "DEPRECATED: The '--name %s' flag is deprecated; use '--name %s' instead", SlackPlatformFeedbackDeprecated, SlackPlatformFeedback)
}

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: I print a deprecation message to our PrintDebug instead of PrintWarning. We use both. Preference?

Copy link
Member

Choose a reason for hiding this comment

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

📣 I'm in favor of annoying and loud deprecation messages to encourage making expected changes as soon as possible.

This is a pattern I've found in build tools like goreleaser and nix that can be frustrating at first, but also save headache when the actual breaking changes do happen!

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool with me! Commit 06e247e now prints this loud and in the open!

image

Comment on lines +71 to +73
_surveys := SurveyStore
SurveyStore = surveys
defer func() { SurveyStore = _surveys }()
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: After adding some Command Table Tests, I noticed that the tests started failing when ran together. The reason is that the current tests clobber the global SurveyStore. This code backs up and restores the original SurveyStore after each test.

🧪 In a follow-up PR, I'd like to refactor these tests to all use the Command Table Test.

@mwbrooks mwbrooks marked this pull request as ready for review April 29, 2025 22:42
@mwbrooks mwbrooks requested a review from a team as a code owner April 29, 2025 22:42
Copy link
Member

@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.

@mwbrooks The feedback command is coming together so nicely! It's much more intuitive to match the feedback target:

  • slack-cli: Slack CLI
  • slack-platform: Slack Platform
  • ...

And I remain excited for what might else be included here 👾

A few rambles were made below, but this is a smooth experience already so please feel free to merge when the time is right 🚢 💨

Comment on lines +71 to +73
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for both this comment and calling out the formatting!

IIRC we are using TODO(semver:major) more often, but this is often for internal breaking changes AFAICT.

I think DEPRECATED is meaningful here since it captures the ongoing support with an existing alternative option, but IMO the semver:major part is the most important! This is what I would use in searching for these 😉

Comment on lines +71 to +73
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
Copy link
Member

Choose a reason for hiding this comment

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

Also I learned in review of #71 that go has a convention around making machine-readable comments that I'm interested in exploring:

...this comment directives are line comments that start with //go:, with no space between the // and the go:.

https://go.dev/wiki/Comments#directives

Using a similar pattern might be interesting for these more "conventional" comments, but I don't believe we have explicit notes on how these should be used overall...

Comment on lines +71 to +73
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
Copy link
Member

Choose a reason for hiding this comment

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

One addition to this comment might also note the deprecated suggestions? 📚

Edit: I realize you make a similar comment a few lines down - no blocker here!

Suggested change
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major)
SlackCLIFeedback = "slack-cli"
SlackPlatformFeedback = "slack-platform"
SlackPlatformFeedbackDeprecated = "platform-improvements" // DEPRECATED(semver:major) - Replaced with the "slack-platform" option

clients.IO.PrintInfo(ctx, false, fmt.Sprintf(
"%s\n%s\n",
style.Secondary("Ask questions, submit issues, or suggest features for the SLack CLI:"),
style.Secondary("Ask questions, submit issues, or suggest features for the Slack CLI:"),
Copy link
Member

Choose a reason for hiding this comment

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

@mwbrooks Whew great catch! It's nice to know this wasn't released, but darn that's an L for sure 😉

Comment on lines 246 to 251
// DEPRECATED(semver:major): Support the deprecated survey name for backwards compatibility
if surveyNameFlag == SlackPlatformFeedbackDeprecated {
surveyNameFlag = SlackPlatformFeedback
clients.IO.PrintDebug(ctx, "DEPRECATED: The '--name %s' flag is deprecated; use '--name %s' instead", SlackPlatformFeedbackDeprecated, SlackPlatformFeedback)
}

Copy link
Member

Choose a reason for hiding this comment

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

📣 I'm in favor of annoying and loud deprecation messages to encourage making expected changes as soon as possible.

This is a pattern I've found in build tools like goreleaser and nix that can be frustrating at first, but also save headache when the actual breaking changes do happen!

Comment on lines +287 to +296
"supports --name slack-platform": {
CmdArgs: []string{"--name", "slack-platform"},
Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) {
setupFeedbackCommandMocks(t, ctx, cm, cf)
},
ExpectedOutputs: []string{
"[email protected]",
"https://docs.slack.dev/developer-support",
},
},
Copy link
Member

Choose a reason for hiding this comment

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

💌 👏

Base automatically changed from mwbrooks-feedback-github-p2 to main May 1, 2025 18:32
@mwbrooks
Copy link
Member Author

mwbrooks commented May 1, 2025

@zimeg Thanks again for the solid review and ideas around Golang comment directives! I'm going to follow-up with a PR that updates our maintainers guide with a recommendation to use the // DEPRECATED(semver:major): code comment 👌🏻

Before merging, I updated the deprecation warning to be printed to stdout! 🙉 💥 📣

@mwbrooks mwbrooks merged commit 192ab46 into main May 1, 2025
6 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-feedback-github-p3 branch May 1, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor 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