Skip to content

Display extension edition & version in PSIC banner #2643

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

Closed
rkeithhill opened this issue Apr 18, 2020 · 10 comments · Fixed by #2644
Closed

Display extension edition & version in PSIC banner #2643

rkeithhill opened this issue Apr 18, 2020 · 10 comments · Fixed by #2644
Assignees
Labels
Area-Extension Terminal Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.

Comments

@rkeithhill
Copy link
Contributor

As long as we are displaying this banner:

=====> PowerShell Integrated Console <=====

It would be more useful if it displayed this:

=====> PowerShell Preview Integrated Console v2020.4.2 <=====

or

=====> PowerShell Integrated Console v2020.4.0 <=====

I switch between four different computers and on some I use preview and others I use stable. It would be nice to see which I'm using without having to look through my extensions list. I know, first world problems. :-)

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Apr 18, 2020

@rkeithhill rkeithhill self-assigned this Apr 18, 2020
@TylerLeonhardt
Copy link
Member

I take it you are going to take this on, @rkeithhill ? 😊 Would be great to see you contributing again!

@rkeithhill
Copy link
Contributor Author

That's the plan. We'll see how it goes. :-)

@rkeithhill
Copy link
Contributor Author

rkeithhill commented Apr 18, 2020

I "think" this might be best addressed in the vscode-powershell repo. The question I suppose is what version info should it display? Version info for the extension or version info for PSES? If we do this on the extension side, it is pretty easy e.g.:

        if (this.sessionSettings.integratedConsole.suppressStartupBanner) {
            this.editorServicesArgs += "-StartupBanner '' ";
        } else {
            const packageJSON: any = require("../../package.json");
            const previewStr = (packageJSON.name.toLowerCase() === "powershell-preview") ? "Preview " : "";
            const version = packageJSON.version;

            const startupBanner = `

            =====> PowerShell ${previewStr}Integrated Console v${version} <=====

            `;

            this.editorServicesArgs += `-StartupBanner "${startupBanner}" `;
        }

If want want to do this on the PSES side, I'm not sure where to get the preview status. The BuildInfo.cs class does have a BuildVersion field but nothing on preview status unless that gets reflected by BuildOrigin when you do a build for publish. Thoughts?

@TylerLeonhardt
Copy link
Member

I was thinking this would purely be on the extension side. Just because:

  • Users will see it and they don't know anything about PSES
  • We as maintainers can easily find out which version of PSES is with X version of the extension.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Apr 18, 2020

Also I'm pretty sure this.HostVersion gives you the version... and maybe we should have a this.HostName that says PowerShell vs PowerShell Preview

@TylerLeonhardt
Copy link
Member

We can probably use this which were this.HostVersion's value originally comes from I believe:
https://github.com/PowerShell/vscode-powershell/blob/master/src/main.ts#L42

@TylerLeonhardt
Copy link
Member

I'm gonna transfer this to vscode-powershell.

@TylerLeonhardt TylerLeonhardt transferred this issue from PowerShell/PowerShellEditorServices Apr 18, 2020
@TylerLeonhardt TylerLeonhardt added Area-Extension Terminal Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs. labels Apr 18, 2020
@rkeithhill
Copy link
Contributor Author

Any opinion on whether it should be v2020.4.2 or 2020.4.2?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 18, 2020
@ghost ghost added the Status: In PR label Apr 18, 2020
@TylerLeonhardt
Copy link
Member

I like it with the v personally :)

@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Apr 18, 2020
@ghost ghost added Status: Fixed and removed Status: In PR labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extension Terminal Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants