Skip to content

Commit

Permalink
Updating the extension activation triggers to only include Stripe-rel…
Browse files Browse the repository at this point in the history
…ated actions. (#219)

This is in response to #187.
  • Loading branch information
gracegoo-stripe authored Apr 28, 2021
1 parent fbbaec8 commit 815b5e2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
"finance"
],
"activationEvents": [
"onDebugInitialConfigurations",
"onDebug",
"onView:stripeEventsView",
"onView:stripeLogsView",
"onView:stripeDashboardView",
Expand All @@ -56,15 +54,7 @@
"onCommand:stripe.clearRecentLogs",
"onCommand:stripe.clearRecentEvents",
"onCommand:stripe.startEventsStreaming",
"onCommand:stripe.stopEventsStreaming",
"onLanguage:typescript",
"onLanguage:javascript",
"onLanguage:csharp",
"onLanguage:go",
"onLanguage:python",
"onLanguage:ruby",
"onLanguage:java",
"onLanguage:php"
"onCommand:stripe.stopEventsStreaming"
],
"main": "./dist/extension.js",
"contributes": {
Expand Down

4 comments on commit 815b5e2

@auchenberg
Copy link

Choose a reason for hiding this comment

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

Note: This might break debugging and the language server

@gracegoo-stripe
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey Kenneth, do you mean debugging for the end user? If so can you expand?

Regarding the language server, you're totally right. The user wouldn't be getting the hover-over or linting until they trigger the first Stripe action. Thinking about some workarounds now.

@auchenberg
Copy link

@auchenberg auchenberg commented on 815b5e2 Apr 30, 2021

Choose a reason for hiding this comment

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

@gracegoo-stripe The Stripe extensions contribute debugging configurations that are needed when the user wants to configure their debugging. VS Code asks all extensions that contribute onDebugInitialConfigurations and the extensions return the configurations they support, so they show up in the autocompletion. Same for onDebug when the user intends to start a debugging session.

Like-wise for the onLanguage where VS Code activates extensions for the relevant open file, so the language server can be queried.

In short, we need these events, to make sure the relevant parts of the VS Code extension get activated at the right points.

I would reconsider this alert/prompt/confirm UI as it's really not native to VS Code. You see native VS Code UI and extension use WelcomeView to avoid blocking. Check out the source control view and how it works if git isn't installed or found on the machine.

@gracegoo-stripe
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Kenneth. I'll revert this commit.

Please sign in to comment.