SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 993 forks source link

SPFx Top Actions Doc Clarification Suggestion #8890

Open andrewconnell opened 1 year ago

andrewconnell commented 1 year ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

macOS

What browser(s) / client(s) have you tested

Additional environment details

n/a

Describe the bug / error

The internal docs for Top Actions aren't clear which are used to generate the published docs & this make IntelliSense unclear in VSCode.

Specifically...

ITopActions.onExecute()

The descriptions for the two parameters passed into the method could be improved to provide clarity for developers without having to go to the docs.

I suggest:

/**
 * Triggered once the top action configuration state has been executed for the specified property path
 * 
 * @param actionName - the `targetProperty` of the control that triggered the event
 * @param updatedValue - when the control that triggered the event is a dropdown field, this is the `key` of the selection dropdown option; otherwise when the control is a button, this is `true`
 */
onExecute(actionName: string, updatedValue: any): void;

Why?

ITopActionsButtonProps.icon

Furthermore, the icon property for a button is a string but doesn't give any context on where to get the icon from. It's confusing as to why this is different from the icon on a dropdown control which has its own interface ITopActionsDropdownOptionIconProps.

I can't suggest anything here because I'm confused...

Steps to reproduce

n/a

Expected behavior

n/a

ghost commented 1 year ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.