If you'd like to contribute to this repository, please read the following guidelines. Contributors are more than welcome to share their learnings with others from a centralized location.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Please do not open GitHub issues for general support questions as the GitHub list should be used for feature requests and bug reports. This way we can more easily track actual issues or bugs from the code and keep the general discussion separate from the actual code.
If you have questions about how to use the SharePoint Framework or any of the provided samples, please use the following locations.
- SharePoint Developer Space at http://techcommunity.microsoft.com
- SharePoint Stack Exchange with 'spfx' tag
Whenever you are submitting any changes to the SharePoint repositories, please follow these recommendations.
- Always fork repository to your own account for applying modifications
- Do not combine multiple changes in one pull request. For example, please submit any samples and documentation updates using separate PRs
- If you are submitting multiple samples, please create specific PR for each of them
- If you are submitting typo or documentation fix, you can combine modifications to single PR where suitable
When you are submitting a new sample, it has to follow up below guidelines
- You will need to have a
README.md
file for your contribution, which is based on the provided template under thesamples
folder. Please copy this template and update it accordingly. YourREADME.md
file must be namedREADME.md
-- with capital letters -- as this is the information we use to make your sample public.- You will need to have a screenshot image demonstrating the extension in action in the README file ("pics or it didn't happen"). The preview image must be located in the
/assets/
folder in the root of your solution.
- You will need to have a screenshot image demonstrating the extension in action in the README file ("pics or it didn't happen"). The preview image must be located in the
- The README template contains a specific tracking image at the end of the file with an
img
element pointing tohttps://telemetry.sharepointpnp.com/sp-dev-fx-extensions/samples/readme-template
. This is a transparent image which is used to track how many visits each sample receives in GitHub.- Update the image
src
attribute according with repository name and folder information. For example, if your sample is namedreact-todo
in thesamples
folder, update thesrc
attribute tohttps://telemetry.sharepointpnp.com/sp-dev-fx-extensions/samples/react-todo
- Update the image
- If you find that a sample similar to yours already exists in this repository, we would prefer that you add to the existing sample, rather than submitting a new sample
- For example, if you use Office Graph with React, please add a new web part to the already existing solution, rather than introducing a completely new solution
- When you update existing samples, please update also README accordingly with information on provided changes and with your author details
- When you are submitting a new sample solution, please name the sample solution folder accordingly
- Folder should start by identifying JS library used - like
react-
,angular-
,knockout-
- If you are not using any specific JS library, please use
js-
as the prefix for your sample - Do not use words "sample", "extension" or "wb" in the folder or sample name - these are samples for client-side extensions repository
- If your solution is demonstrating multiple technologies, please use functional terms as the name for the solution folder
- Folder should start by identifying JS library used - like
- Do not use period/dot in the folder name of the provided sample
Here's a high-level process for submitting new samples or updates to existing ones.
- Sign the Contributor License Agreement (see below)
- Fork this repository SharePoint/sp-dev-fx-extensions to your GitHub account
- Create a new branch from the
master
branch for your fork for the contribution - Include your changes to your branch
- Commit your changes using descriptive commit message * These are used to track changes on the repositories for monthly communications
- Create a pull request in your own fork and target
master
branch - Fill up the provided PR template with the requested details
Before you submit your pull request consider the following guidelines:
-
Search GitHub for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
-
Make sure you have a link in your local cloned fork to the SharePoint/sp-dev-fx-extensions:
# check if you have a remote pointing to the Microsoft repo: git remote -v # if you see a pair of remotes (fetch & pull) that point to https://github.com/SharePoint/sp-dev-fx-extensions, you're ok... otherwise you need to add one # add a new remote named "upstream" and point to the Microsoft repo git remote add upstream https://github.com/SharePoint/sp-dev-fx-extensions.git
-
Make your changes in a new git branch:
git checkout -b react-field-slider master
-
Ensure your fork is updated and not behind the upstream sp-dev-fx-extensions repo. Refer to these resources for more information on syncing your repo:
-
Keep Your Forked Git Repo Updated with Changes from the Original Upstream Repo
-
For a quick cheat sheet:
# assuming you are in the folder of your locally cloned fork.... git checkout master # assuming you have a remote named `upstream` pointing official **sp-dev-fx-extensions** repo git fetch upstream # update your local master to be a mirror of what's in the main repo git pull --rebase upstream master # switch to your branch where you are working, say "react-field-slider" git checkout react-field-slider # update your branch to update it's fork point to the current tip of master & put your changes on top of it git rebase master
-
Push your branch to GitHub:
git push origin react-field-slider
If the sample you wish to contribute is stored in your own GitHub repository, you can use the following steps to merge it with this repository:
-
Fork the
sp-dev-fx-extensions
repository from GitHub -
Create a local git repository
md sp-dev-fx-extensions cd sp-dev-fx-extensions git init
-
Pull your forked copy of sp-dev-fx-extensions into your local repository
git remote add origin https://github.com/yourgitaccount/sp-dev-fx-extensions.git git pull origin master
-
Pull your other project from GitHub into the samples folder of your local copy of
sp-dev-fx-extensions
git subtree add --prefix=samples/projectname https://github.com/yourgitaccount/projectname.git master
-
Push the changes up to your forked repository
git push origin dev
Before we can accept your pull requests you will be asked to sign electronically Contributor License Agreement (CLA), which is a pre-requisite for any contributions to any PnP repository. This will be a one time process, so for any future contributions you will not be asked to re-sign anything. After the CLA has been signed, our PnP core team members will have a look on your submission for final verification of the submission. Please do not delete your development branch until the submission has been closed.
You can find Microsoft CLA from the following address - https://cla.microsoft.com.
Thank you for your contribution.
Sharing is caring.