How to contribute?¶
You can contribute to this project at multiple levels:
- Help us with the issues list by:
- Answer questions from the community
- Fix issues in the code
- Improve documentation by:
- Correcting typos
- Clarify configuration and examples
- Add business scenario tutorials
- Add new reusable components or suggestions providers to the extensibility library.
- Add Web Part translations
As a result, we accept pull requests fom the community. You can refer to this post by Hugo Bernier to know how make a PR on a GitHub repository.
Your PR must target the
Your PR will be automatically rejected if
- It alters too much the core architecture of the solution or the amount of code is to important to be reviewed properly.
- You don't provide any detailled steps to test it.
- It contains a new feature that was not discussed previously with the maintainers.
Setting up the solution locally¶
Before making any PR, you need to setup this project locally on your machine. This solution is composed of three distinct parts:
||SPFx Web Parts code|
||SPFx library component containing shared code between core Web Parts and extensibilty library.|
||Reusable components to extend capabilities of core Web Parts.|
Setup the search-extensibility project¶
search-extensibilty project is an SPFx library component containing all the shared interfaces for the
search-extensibility-demo other SPFx projects. As a result, it must be linked to these project first before using them:
- Open the
search-extensibilityproject and install dependencies using
npm ior your favorite package manager.
- Build the project using the command
- Run the command
npm linkto create a symbolic link.
You can also refer to the official SPFx documentation about library component usage.
Setup the search-parts and search-extensibility-demo projects¶
- From the
search-extensibility-demoproject, link a reference to the
@pnp/modern-search-extensibilityproject by using the following command
npm link @pnp/modern-search-extensibility.
- Build the project using
Debug the solution¶
- From Visual Studio Code console or any other console, from the
search-partsfolder, use the
npm run servecommand to start the server. We use SPFx Fast Serve Tool from Sergei Sergeev to speed up development process.
- From Visual Studio Code, use the 'Hosted Workbench' debug configuration with your URL to debug the Web Parts. Any changes to the code will trigger a new build and refresh your page automatically within seconds.