-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure command enablement #1643
Conversation
719ff3e
to
df0652a
Compare
Needs #1644 for tests to be fixed |
df0652a
to
19f66bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say I don't love the HashiCorp
prefix as it makes everything quite verbose in places but that's more a reflection on the whole Marketplace and VS Code situation in general - as in I don't love it in the extension name either. It is certainly not a reflection on your PR here! 😅
It dampens the impact of those newly introduced commands, so LGTM aside from the minor questions in-line.
19f66bb
to
79f5476
Compare
This commit hides all Terraform Cloud commands when the user is not logged in. This is done by adding an `enablement` property to each commadn that checks that context value for `terraform.cloud.signed-in` is true. This commit also adds a new context value `terraform.cloud.views.visible` that is set to true when the TFC workspace view is visible. This is the closest thing we get to knowing if the user has enabled our views since the Activity Bar icon does not have a event for visiblity. This is used in conjunction with the `terraform.cloud.signed-in` context value to hide the TFC commands when the user is not logged in.
This adds HashiCorp to the command names to disambiguate commands contributed by this extension and align to the Terraform Cloud contributed commands.
79f5476
to
4ee42f6
Compare
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Before:
After:
With TFC disabled:
With TFC enabled and not logged in:
With TFC enabled and logged in: