Skip to content

Fix tooltip for variable expansion and include description #25112

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

Conversation

jborean93
Copy link
Collaborator

PR Summary

Fixes the tooltip for non-scoped variables to include the type and variable name like it does for scoped variables. Also includes the variable description if present on the variable object.

PR Context

It looks like there is a bug where the tooltip was built for a variable but not included in the completion result, this PR makes sure that isn't thrown away.

It also makes a further change to include the variable description if it's present. This may not be used for user variables but there are a few builtin variables where is a description and would be nice to include in the tooltip.

image

PR Checklist

Fixes the tooltip for non-scoped variables to include the type and
variable name like it does for scoped variables. Also includes the
variable description if present on the variable object.
Copy link
Collaborator

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

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

LGTM with 2 style comment.

(Since it is very small PR you can add descriptions to some system variables where absent if you want.)

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Mar 2, 2025
@iSazonov iSazonov self-assigned this Mar 2, 2025
Co-authored-by: Ilya <darpa@yandex.ru>
@iSazonov

This comment was marked as outdated.

This comment was marked as outdated.

@JustinGrote
Copy link
Contributor

Updated PSES PR so that this will work if merged.

image

@iSazonov iSazonov changed the title Fix tooltip for var expansion and include desc Mar 3, 2025
@iSazonov iSazonov changed the title Fix tooltip for variable expansion and include desc Mar 3, 2025
@iSazonov iSazonov merged commit 05214da into PowerShell:master Mar 3, 2025
38 of 40 checks passed
Copy link
Contributor

microsoft-github-policy-service bot commented Mar 3, 2025

📣 Hey @jborean93, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@jborean93 jborean93 deleted the variable-description-completion branch March 3, 2025 04:24
@jborean93
Copy link
Collaborator Author

Thanks for the review and merge.

@JustinGrote
Copy link
Contributor

Thank you @iSazonov !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
3 participants