Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/app/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestAppAddCommandPreRun(t *testing.T) {
Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) {
cf.SDKConfig.WorkingDirectory = "."
cm.AddDefaultMocks()
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks)
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
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: Side effect of updating BoltFrameworks to be an Experiment.

cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug)
mockProjectConfig := config.NewProjectConfigMock()
mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceRemote, nil)
Expand All @@ -115,7 +115,7 @@ func TestAppAddCommandPreRun(t *testing.T) {
Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) {
cf.SDKConfig.WorkingDirectory = "."
cm.AddDefaultMocks()
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks)
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug)
mockProjectConfig := config.NewProjectConfigMock()
mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceLocal, nil)
Expand Down
4 changes: 2 additions & 2 deletions cmd/manifest/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestInfoCommand(t *testing.T) {
},
}, nil)
cf.AppClient().Manifest = manifestMock
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks)
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug)
mockProjectConfig := config.NewProjectConfigMock()
mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceLocal, nil)
Expand Down Expand Up @@ -162,7 +162,7 @@ func TestInfoCommand(t *testing.T) {
cf.SDKConfig.WorkingDirectory = "."
cm.IO.AddDefaultMocks()
cm.Os.AddDefaultMocks()
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks)
cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug)
mockProjectConfig := config.NewProjectConfigMock()
mockProjectConfig.On("GetManifestSource", mock.Anything).
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/using-slack-cli-with-bolt-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ View more samples

You will then be prompted to choose between **Bolt for JavaScript** or **Bolt for Python**. Choose your favorite flavor.

Your app will be cloned from the respective [JavaScript](https://github.com/slack-samples/bolt-js-starter-template) or [Python](https://github.com/slack-samples/bolt-python-starter-template) project template on our Slack Platform Sample Code repository, and its project dependencies will be installed. Then, `cd` into your project folder.
Your app will be cloned from the respective [JavaScript](https://github.com/slack-samples/bolt-js-starter-template) or [Python](https://github.com/slack-samples/bolt-python-starter-template) project template on our Slack Platform Sample Code repository, and its project dependencies will be installed. Then, `cd` into your project folder.
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: Editor auto-removed trailing whitespace.


:::info

For Bolt for Python projects, automatic project dependency installation is currently unsupported, and will need to be done manually. For more information, refer to [Getting started with Bolt for Python](https://tools.slack.dev/bolt-python/getting-started).

:::

To run your new app, use the `slack run` command with the experiment flag as follows:
To run your new app, use the `slack run` command as follows:
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 think this was left over from when we had --experiment bolt.

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 reviewing these pages as part of this change 👾 ✨


```
slack run
```

You'll be prompted to choose your team/workspace, and then your app should let you know that it's up and running. 🎉
You'll be prompted to choose your team/workspace, and then your app should let you know that it's up and running. 🎉
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: Editor auto-added a newline to end of file.

3 changes: 2 additions & 1 deletion docs/reference/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ The Slack CLI has an experiment flag, behind which we put features under develop

The following is a list of currently available experiments. We may remove an experiment once the feature is released.

* `read-only-collaborators`: enables creating and modifying collaborator permissions via the `slack collaborator` commands.
* `bolt-install`: enables creating, installing, and running Bolt projects that manage their app manifest on app settings (remote manifest).
* `read-only-collaborators`: enables creating and modifying collaborator permissions via the `slack collaborator` commands.
Comment on lines +9 to +10
Copy link
Member Author

Choose a reason for hiding this comment

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

question: How does this look for documenting the new experiment?

Copy link
Member

Choose a reason for hiding this comment

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

I like how an overall goal of the experiment is here to start!

One idea is to add sub-bullet points under the experiment in experiments.md to document what's available.

This is also a good idea IMO! Were you thinking of these as copied commit messages or more complete blurbs on the change?

You've been writing nice CHANGELOG notes at the top of PRs and I might lean towards matching that here but am also so curious of other thoughts 📚 ✨

Copy link
Member

Choose a reason for hiding this comment

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

📝 Keeping all of these notes in experiments.md also might make following changes faster for the wonderful readers.

It's seeming like this experiment will span multiple commands which could be confusing without reading all of the help pages otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

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

📝 Keeping all of these notes in experiments.md also might make following changes faster for the wonderful readers.

This was my thought as well. The bullet point list written for the developers using the feature will help them follow along and know what's available. We can also link to the PR that implements the features 🤔

When we release the feature, the bullet point list will help us draft a release announcement. If we need extra details, we can find them in the PRs by searching for the experiment label and text (bolt-install)

Copy link
Member

Choose a reason for hiding this comment

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

@mwbrooks Oh, wow! Linking to PRs I guess is now an option. I like this idea a lot 😌 🟩

7 changes: 6 additions & 1 deletion internal/experiment/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ type Experiment string
const (
// BoltFrameworks experiment adds CLI support for Bolt JavaScript & Bolt Python.
// These frameworks will be introducing remote function support.
BoltFrameworks = "bolt"
BoltFrameworks Experiment = "bolt"
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: Updated to be cast as an Experiment instead of string

Copy link
Member

Choose a reason for hiding this comment

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

Woah great catch... At first I thought this was an extra space 😴


// BoltInstall experiment enables developerInstall to work with Bolt projects that
// manage their app manifest on app settings (remote manifest).
BoltInstall Experiment = "bolt-install"

// The ReadOnlyAppCollaborators experiment enables creating and modifying collaborator
// permissions via the `collaborator` commands.
Expand All @@ -46,6 +50,7 @@ const (
// AllExperiment is a list of all available experiments that can be enabled
var AllExperiments = []Experiment{
BoltFrameworks,
BoltInstall,
ReadOnlyAppCollaborators,
Placeholder,
}
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/apps/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func TestInstall(t *testing.T) {
clientsMock.AppClient.Manifest = manifestMock
mockProjectConfig := config.NewProjectConfigMock()
if tt.mockBoltExperiment {
clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, experiment.BoltFrameworks)
clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
clientsMock.Config.LoadExperiments(ctx, clientsMock.IO.PrintDebug)
mockProjectConfig.On("GetManifestSource", mock.Anything).Return(tt.mockManifestSource, nil)
}
Expand Down Expand Up @@ -982,7 +982,7 @@ func TestInstallLocalApp(t *testing.T) {
clientsMock.AppClient.Manifest = manifestMock
mockProjectConfig := config.NewProjectConfigMock()
if tt.mockBoltExperiment {
clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, experiment.BoltFrameworks)
clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, string(experiment.BoltFrameworks))
clientsMock.Config.LoadExperiments(ctx, clientsMock.IO.PrintDebug)
mockProjectConfig.On("GetManifestSource", mock.Anything).Return(tt.mockManifestSource, nil)
}
Expand Down
Loading