Add descriptive tooltips to AD property completions#5
Add descriptive tooltips to AD property completions#5TMA-2 wants to merge 1 commit intoMartinGC94:mainfrom
Conversation
Modified `Shared\AdProperties.ps1` to a hashtable with field descriptions displayed as completion result tooltips.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the Active Directory property completions by adding comprehensive descriptions for all AD properties. Previously, the completions only showed property names; now they display helpful tooltips describing what each property does.
Key changes:
- Converted property arrays to hashtables with property names as keys and descriptions as values
- Updated the completion logic to pass descriptions to
NewParamCompletionResult() - Added detailed, user-friendly descriptions for hundreds of AD properties across all supported cmdlets
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Thank you. This looks great at a glance but in hindsight I should probably have tried to group the different properties a bit to avoid all these duplicate entries. Right now my idea on how to do this would be like this: Or maybe it would be worth it to dynamically create a new hashtable with all the properties/descriptions so we can sort the keys before outputting them. Anyway, do you have any other ideas on how we could do this? |
|
Good idea - grouping common properties would reduce duplication. Let me think about the best way to organize the categories and get back to you. I've been task-switching across too many projects today and need to come back to this when my head doesn't hurt. But for posterity, I did something similar for this little ActiveDirectoryEx helper module (that basically only I use at work) to make up for some of the main ActiveDirectory module's shortcomings, with Common, User, Group, etc. keys stored in a psd1 and read on import. but I think the implementation you came up with works better. I'd have to check what exactly I did. |
Added comprehensive descriptions for AD properties to improve completer usability. Tooltips now provide context about what each property does rather than just showing the property name.
Uses the existing
CompletionHelper::CompleteProperty()pattern with parameter/description hashtables.