SharePoint / sp-dev-docs

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

Should top actions dropdown items support custom images in addition to Fluent icons? #9454

Open mbice opened 10 months ago

mbice commented 10 months ago

What type of issue is this?

Question

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

πŸ’₯ SharePoint Framework

Target SharePoint environment

SharePoint Online

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

Additional environment details

Issue description

Hi,

Looking at the documentation for Top Actions it looks like we should be able to set imageSrc and selectedImageSrc properties in order to render a custom image for a top action dropdown item. We would like to use this for scenarios where there is not an appropriate Fluent icon and we still want to show an image-based icon.

https://learn.microsoft.com/en-us/javascript/api/sp-top-actions/itopactionsdropdownoption?view=sp-typescript-latest#@microsoft-sp-top-actions-itopactionsdropdownoption-imagesrc-member

I've tried out both an image string path and base64 encoded string for imageSrc and selectedImageSrc and no image is shown. Is this expected? If not, is there a reason why this wouldn't be supported the same way we add images to choice group web part properties?

Thanks!

ghost commented 10 months ago

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

mbice commented 9 months ago

Any update on whether or not this is officially supported? We often use custom iconography for our web parts and would like to move some of these properties into top actions for faster access by page authors. There are many cases in which we can't find appropriate Fluent equivalent icons to having support for custom images here would be a great capability. Thanks!