Skip to content

Add custom HTML views to VSCode module #523

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

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jun 20, 2017

This change adds support for custom HTML views in the VSCode module
which forms the basis for UI extensions in the PowerShell extension in
Visual Studio Code. This change includes both .NET PowerShell
cmdlet APIs for interacting with custom HTML UI in the editor.

@daviwil daviwil added this to the June 2017 milestone Jun 20, 2017
@daviwil daviwil changed the title Add custom HTML views to VSCode module WIP: Add custom HTML views to VSCode module Jun 20, 2017
@daviwil
Copy link
Contributor Author

daviwil commented Jun 20, 2017

I'm not fully done here yet, I think I need to rethink the HtmlContentView/HtmlOutputView split because there's a lot of unnecessary API duplication there. Any thoughts?

I'll send the vscode-powershell PR after I've firmed this one up.

@daviwil
Copy link
Contributor Author

daviwil commented Jun 20, 2017

A few firsts in this change:

  • This is the first time a new feature component has been added from an extension module
  • This is the first time that new message types have been added from an extension module
  • This is also the first attempt at making a cmdlet wrapper on top of the .NET APIs instead of exposing the .NET APIs directly for PowerShell scripting

Would love some feedback on any of these since I'm still trying to formalize the pattern.

@dfinke
Copy link
Contributor

dfinke commented Jun 20, 2017

I like the sound of a message type being added from an extension module

@SeeminglyScience
Copy link
Collaborator

Great job with the wrappers, these will be a lot easier to discover from PowerShell.

@daviwil
Copy link
Contributor Author

daviwil commented Jun 20, 2017

What are your thoughts on using a DefaultCommandPrefix of VSCode? This means that all cmdlets like New-HtmlContentView will turn into New-VSCodeHtmlContentView when imported. Even though prefixing is considered somewhat of a best practice, I feel like it makes the cmdlet names a lot clunkier and harder to type. Thoughts?

@dfinke
Copy link
Contributor

dfinke commented Jun 20, 2017

Yeah, clunkier. I do like the option of being able to do gcm *-vsc* and seeing all the cmdlets I can use.

@daviwil
Copy link
Contributor Author

daviwil commented Jun 20, 2017

The ISE only exposes 3 cmdlets but they're all prefixed "Ise", so maybe prefixing is generally the right thing to do. I'll hardcode the prefixes for now instead of using DefaultCommandPrefix so that I have the opportunity to change the name later and use aliases for the old prefixed versions. Thanks Doug!

This change adds support for custom HTML views in the VSCode module
which forms the basis for UI extensions in the PowerShell extension in
Visual Studio Code.  This change includes both .NET PowerShell
cmdlet APIs for interacting with custom HTML UI in the editor.
@daviwil daviwil changed the title WIP: Add custom HTML views to VSCode module Add custom HTML views to VSCode module Jun 20, 2017
@daviwil daviwil merged commit e98a8b9 into PowerShell:master Jun 20, 2017
@daviwil daviwil deleted the html-views branch June 20, 2017 22:20
@daviwil daviwil modified the milestones: June 2017, 1.4.0 Jun 20, 2017
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
…able-syntax

Fix issue with VSCode var syntax change . to :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants