Skip to content

Eli-Schei/SPfx-react-my-tools-webpart

Repository files navigation

Personal tools list

Summary

This webpart allows users to select tools from a predefined list and save them in their own personalized view. This webpart has the fundamental functionallity - a great starting point to build upon if you need something more advanced.

  • The user can select from this list what link(s) he/she wants to be displayed for them.

  • Select tools

  • The tools will be displayed like this:

  • The webpart title can be changed from the property pane, here you can also select to display the tools in two columns (defaults to 1 column if this is not selected)

In the background

The available tools are added to a list to show up in the webpart The webpart saves to another list..

Solution

Using SPfx version

Solution Author(s)
SPFX-react-my-tools-webpart Eli H. Schei

Version history

Version Date Comments
1.0 February 08, 2024 Initial release

Minimal Path to Awesome

Prerequisites

You need to run the script in the env-setup folder to create the content types and lists used in the code. If you create them manually you might need to change the code to use the correct list and field names.

Running the code locally

If you need an environment for development and/or testing --> Get your own free development tenant by subscribing to Microsoft 365 developer program

  • Clone this repository
  • Run the script in the "env-setup" folder (you need pnp-poweshell to run this)
  • In your CLI navigate to thesolution folder (the folder where this readme file lives)
  • in the command-line run:
    • npm install
    • gulp serve

Package and deploy webpart

Here is a blogpost that takes you through every step

Package

First you need to package the solution for production

gulp build
gulp bundle --ship
gulp package-solution --ship

Then you can upload the sppkg to your appcatalog manually, or using PnP powershell as shown below.

Connect-PnPOnline "appcatalogurl" -Interactive

$appCatConnection = Connect-PnPOnline $appcatalog -ReturnConnection -Interactive

Add-PnPApp -Path "./project-wp.sppkg" -Connection $appCatConnection -Publish -SkipFeatureDeployment -Overwrite

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


About

Repository for code sample used in blogpost

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors