Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add tooltips for hashtable key completions#17864

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iSazonov merged 13 commits intoPowerShell:masterfromMartinGC94:FixToolTips
Mar 25, 2025

Conversation

MartinGC94
Copy link
Contributor

@MartinGC94MartinGC94 commentedAug 9, 2022
edited
Loading

PR Summary

Fixes#15450

Add tooltips for hashtable key completions
Use resource files instead of dictionary for comment completion tooltips

PR Context

PR Checklist

Add completion for calculated properties for Compare-Object and ConvertTo-HTMLAdd argument completer for the Property parameter of ConvertTo-HtmlUse resource files instead of dictionary for comment completion tooltips
@ghostghost added the Review - NeededThe PR is being reviewed labelAug 19, 2022
@ghost
Copy link

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days.
Maintainer, please provide feedback and/or mark it asWaiting on Author

@TravisEz13
Copy link
Member

@daxian-dbw Can you review?

@ghostghost removed the Review - NeededThe PR is being reviewed labelMay 8, 2023
@ghostghost added the Review - NeededThe PR is being reviewed labelMay 16, 2023
@ghost
Copy link

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days.
Maintainer, please provide feedback and/or mark it asWaiting on Author

@pull-request-quantifier-deprecated

This PR has360 quantified lines of changes. In general, a change size of upto200 lines is ideal for the best PR experience!


Quantification details

Label      : LargeSize       : +315 -45Percentile : 76%Total files changed: 3Change summary by file extension:.cs : +85 -28.resx : +212 -0.ps1 : +18 -17

Change counts above are quantified counts, based on thePullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using thecontext generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out theExcluded section from yourprquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in yourprquantifier.yaml context profile.
    • Only use the labels that matter to you,see context specification to customize yourprquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added:+1 -0
  • One line was deleted:+0 -1
  • One line was modified:+1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful?👍 :ok_hand: :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@iSazonov
Copy link
Collaborator

@MartinGC94 Are all these changes related, or can you break them down into different PRs?

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Review - NeededThe PR is being reviewed labelMar 20, 2025
@MartinGC94
Copy link
ContributorAuthor

MartinGC94 commentedMar 20, 2025
edited
Loading

@iSazonov Everything except the additional switch cases forCompare-Object andConvertTo-Html are related. I can pull out those changes but it's like 10 lines of code that we "save" on that, so not sure if it's worth it, but it's up to you.

-Edit: I changed my mind and removed the irrelevant changes. The PR could be further split into tooltips for hashtables, and updating the tooltips for help keywords to use the resource file but then I'd have to deal with annoying merge conflicts so I'd prefer not to.

@iSazonoviSazonov added the CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log labelMar 24, 2025
@iSazonov

This comment was marked as outdated.

@azure-pipelinesAzure Pipelines

This comment was marked as outdated.

</data>
<data name="DepthHashtableKeyDescription" xml:space="preserve">
<value>[int]
The depth key allows you to specify the depth of expansion per property.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please reword like:

Suggested change
The depth keyallows you to specify the depth of expansion per property.</value>
The depth keyspecifies the depth of expansion per property.</value>

</data>
<data name="AscendingHashtableKeyDescription" xml:space="preserve">
<value>[bool]
Allows you to specify the order of sorting for one or more properties.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same.

</data>
<data name="DescendingHashtableKeyDescription" xml:space="preserve">
<value>[bool]
Allows you to specify the order of sorting for one or more properties.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same.

</data>
<data name="DataHashtableKeyDescription" xml:space="preserve">
<value>[string[]]
Selects events with any of the specified values in the EventData section.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add an example in the help?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The tooltips generally don't have examples. I'm also not sure how much value there would be in something like:Get-WinEvent -FilterHashtable @{LogName="System";ID=7040;Data="BITS"} because unless you happen to have the raw event data in front of you, you won't know what field "BITS" refers to. The same goes for theSuppressHashFilter suggestion.

</data>
<data name="SuppressHashFilterHashtableKeyDescription" xml:space="preserve">
<value>[hashtable]
Excludes events that match the values specified in the hashtable.</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same.

Comment on lines +485 to +497
<data name="CommentHelpSYNOPSISKeywordDescription" xml:space="preserve">
<value>A brief description of the function or script.
This keyword can be used only once in each topic.</value>
</data>
<data name="CommentHelpDESCRIPTIONKeywordDescription" xml:space="preserve">
<value>A detailed description of the function or script.
This keyword can be used only once in each topic.</value>
</data>
<data name="CommentHelpPARAMETERKeywordDescription" xml:space="preserve">
<value>.PARAMETER &lt;Parameter-Name&gt;
The description of a parameter.
Add a .PARAMETER keyword for each parameter in the function or script syntax.</value>
</data>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use the same pattern started with keyword everywhere?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Do you mean replacing all the*HashtableKeyDescription instances withHashtableKeyDescription*? (Example: StartTimeHashtableKeyDescription -> HashtableKeyDescriptionStartTime)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean.PARAMETER in help text.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I see. The point of.PARAMETER <Parameter-Name> is to show the required syntax. I use it for all the help keywords that take some sort of parameter, for example:EXTERNALHELP andFORWARDHELPCATEGORY. For the help keywords that don't take any arguments (SYNOPSIS and others) I don't see any reason to include an extra line with just the keyword.

@iSazonov
Copy link
Collaborator

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@iSazonoviSazonovenabled auto-merge (squash)March 25, 2025 05:11
@iSazonoviSazonov merged commit1ac3ff1 intoPowerShell:masterMar 25, 2025
38 of 40 checks passed
@microsoft-github-policy-serviceMicrosoft GitHub Policy Service
Copy link
Contributor

microsoft-github-policy-servicebot commentedMar 25, 2025
edited by unfurl-linksbot
Loading

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

🔗https://aka.ms/PSRepoFeedback

Sysoiev-Yurii pushed a commit to Sysoiev-Yurii/PowerShell that referenced this pull requestMay 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JamesWTruherJamesWTruherJamesWTruher left review comments

@iSazonoviSazonoviSazonov approved these changes

@daxian-dbwdaxian-dbwAwaiting requested review from daxian-dbw

Assignees

@iSazonoviSazonov

Labels
CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change LogLarge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Use resources instead of hard coded strings for tab completion tooltip text
4 participants
@MartinGC94@TravisEz13@iSazonov@JamesWTruher

[8]ページ先頭

©2009-2025 Movatter.jp