sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Web Part Tile and Gallery Entry

Open NikCharlebois opened this issue 10 years ago • 2 comments

*Background: * Create a new HelloWorld Client Side Web Part and deployed it over to the Catalog.

*Issues/Remarks: *

1 - When I add the app from the catalog, it adds a "Add-In Tile" in the View All Site Contents page just like if it was an add-in. However, because their are no add-in webs created for Client Side Web Parts, clicking on the Tile does nothing, which is confusing because all other tiles are redirecting me to my add-in web or to the artefact (list, library, etc.)

2 - How can we change the Tile Icon associated with our Client Side Web Part?

3 - Installing the Client Side Web Part from the catalog, adds an entry in the Web Part Gallery (e.g. WebPart_26399572-8b13-4a1c-aff4-7e4df567bf10.webpart). I can then delete the webpart entry from the Gallery, but the Tile still remains (this is expected). I believe this adds a lot of confusion. Personally, I do not see the need to have a Tile created when installing the Client Side web part, but I do understand that this is probably a limitation due to the fact that the Catalog is the only way to deploy these currently.

NikCharlebois avatar Aug 31 '16 14:08 NikCharlebois

Thanks for your comments.

On #1, this tile is the way to control lifecycle events on the package (updating, removing). I understand the confusion as it's not clickable, unlike the other ones, but on the other hand, it simplifies handling the app lifecycle without adding a different procedure. There was a trade-off between these functionalities. I hope it's not a big inconvenience.

On #2, let me tell that you can, indeed. On config/package-solution.json you can add: { "solution": { ... "iconPath": "a/path/to/the/icon.png", ... } ... } The icon path is the relative path on the sppkg. You can drop the icon in /sharepoint/ folder for that (assume /sharepoint/ is the root folder, for all purposes).

On #3, when your remove the .webpart file, the client-side web part will not appear on the Web Part Gallery for classic pages, but it will still appear on modern pages. Uninstalling the app (from the tile) is the only way to remove the client-side web part from modern pages. I would recommend you to control the app through the tile, and not the individual files that the app installs.

mpasarin avatar May 03 '17 18:05 mpasarin

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 30 '20 06:01 msft-github-bot