Skip to content

Commit 084f34f

Browse files
authored
Merge pull request #1543 from Sandeep-FED/new-sample-mysiteshub
2 parents 96706b6 + 3a58d9c commit 084f34f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+34347
-0
lines changed

samples/react-my-sites-hub/.eslintrc.js

Lines changed: 319 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Dependency directories
7+
node_modules
8+
9+
# Build generated files
10+
dist
11+
lib
12+
release
13+
solution
14+
temp
15+
*.sppkg
16+
.heft
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage
20+
21+
# OSX
22+
.DS_Store
23+
24+
# Visual Studio files
25+
.ntvs_analysis.dat
26+
.vs
27+
bin
28+
obj
29+
30+
# Resx Generated Code
31+
*.resx.ts
32+
33+
# Styles Generated Code
34+
*.scss.ts
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
!dist
2+
config
3+
4+
gulpfile.js
5+
6+
release
7+
src
8+
temp
9+
10+
tsconfig.json
11+
tslint.json
12+
13+
*.log
14+
15+
.yo-rc.json
16+
.vscode

samples/react-my-sites-hub/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.16.0
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Hosted workbench",
6+
"type": "msedge",
7+
"request": "launch",
8+
"url": "https://{tenantDomain}/_layouts/workbench.aspx",
9+
"webRoot": "${workspaceRoot}",
10+
"sourceMaps": true,
11+
"sourceMapPathOverrides": {
12+
"webpack:///.././src/*": "${webRoot}/src/*",
13+
"webpack:///../../../src/*": "${webRoot}/src/*",
14+
"webpack:///../../../../src/*": "${webRoot}/src/*",
15+
"webpack:///../../../../../src/*": "${webRoot}/src/*"
16+
},
17+
"runtimeArgs": [
18+
"--remote-debugging-port=9222",
19+
"-incognito"
20+
]
21+
}
22+
]
23+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
// Configure glob patterns for excluding files and folders in the file explorer.
4+
"files.exclude": {
5+
"**/.git": true,
6+
"**/.DS_Store": true,
7+
"**/bower_components": true,
8+
"**/coverage": true,
9+
"**/jest-output": true,
10+
"**/lib-amd": true,
11+
"src/**/*.scss.ts": true
12+
},
13+
"typescript.tsdk": ".\\node_modules\\typescript\\lib"
14+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"@microsoft/generator-sharepoint": {
3+
"whichFolder": "subdir",
4+
"solutionName": "my-sites-hub",
5+
"componentType": "extension",
6+
"extensionType": "ApplicationCustomizer",
7+
"template": "none",
8+
"componentName": "my-sites-hub",
9+
"plusBeta": false,
10+
"isCreatingSolution": true,
11+
"nodeVersion": "22.18.0",
12+
"sdksVersions": {},
13+
"version": "1.21.1",
14+
"libraryName": "my-sites-hub",
15+
"libraryId": "377c8a5e-4073-4a22-95d2-60b86078cc73",
16+
"environment": "spo",
17+
"packageManager": "npm",
18+
"solutionShortDescription": "my-sites-hub description",
19+
"skipFeatureDeployment": true,
20+
"isDomainIsolated": false
21+
}
22+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# My Sites Hub
2+
3+
## Summary
4+
5+
My Sites Hub is a SharePoint Framework (SPFx) Application Customizer Extension that provides users with a centralized “My Sites” dashboard accessible directly from any SharePoint site.
6+
7+
It helps users discover, manage, and quickly navigate to their Followed, Frequent, and Recently Visited SharePoint sites — without needing to open the SharePoint start page or search manually.
8+
9+
This extension offers a modern, responsive, and fluid experience, seamlessly blending into SharePoint’s native design language.
10+
11+
![Screenshot 1](assets/screenshot1.png)
12+
![Screenshot 2](assets/screenshot2.png)
13+
14+
## Compatibility
15+
16+
| :warning: Important |
17+
|:---------------------------|
18+
| Every SPFx version is optimally compatible with specific versions of Node.js. In order to be able to build this sample, you need to ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
19+
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
20+
21+
## Used SharePoint Framework Version
22+
23+
This sample is optimally compatible with the following environment configuration:
24+
25+
![SPFx 1.21.1](https://img.shields.io/badge/SPFx-1.21.1-green.svg)
26+
![Node.js v22](https://img.shields.io/badge/Node.js-v22-green.svg)
27+
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
28+
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
29+
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
30+
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
31+
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-red.svg)
32+
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-red.svg)
33+
34+
Tested using Node.js v22.18.0
35+
36+
## Applies to
37+
38+
- [SharePoint Framework](https://aka.ms/spfx)
39+
- [Microsoft 365 tenant](https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant)
40+
41+
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](https://aka.ms/m365devprogram)
42+
43+
## Prerequisites
44+
45+
No special setup required — the extension works across any SharePoint Online environment.
46+
47+
## Contributors🧑‍💻
48+
49+
- [Sandeep P S](https://github.com/Sandeep-FED)
50+
51+
## Version history
52+
53+
| Version | Date | Comments |
54+
| ------- | ---------------- | --------------- |
55+
| 1.0 | October 30, 2025 | Initial release |
56+
57+
## Minimal Path to Awesome
58+
59+
- Clone this repository
60+
- Ensure that you are at the solution folder
61+
- in the command-line run:
62+
- `npm install`
63+
- `gulp serve`
64+
65+
## Debug URL for Testing
66+
67+
```javascript
68+
debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fbuild%2Fmanifests.js&loadSPFX=true&customActions=%7B%2201ec7cba-7bc2-4ae6-8f69-0a577999cad1%22%3A%7B%22location%22%3A%22ClientSideExtension.ApplicationCustomizer%22%2C%22properties%22%3A%7B%22testMessage%22%3A%22Test+message%22%7D%7D%7D
69+
```
70+
71+
## Deploy Package Solution
72+
- Ensure that you are at the solution folder
73+
- in the command-line run:
74+
- `gulp build --ship`
75+
- `gulp bundle --ship`
76+
- `gulp package-solution --ship`
77+
- Upload package to AppCatalog & add it to the SharePoint site.
78+
79+
## Features💡
80+
81+
Key capabilities of My Sites Hub:
82+
- Displays Followed, Frequent sites
83+
- Uses SP native APIs for followed/frequent API calls
84+
- Allows users to Follow / Unfollow sites directly
85+
- Built with React, Fluent UI v9
86+
87+
## References
88+
89+
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development.
90+
- [SharePoint Framework](https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant)
91+
- [React Docs](https://react.dev/learn)
92+
93+
## Help
94+
95+
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
96+
97+
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.
98+
99+
If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-my-sites-hub&template=bug-report.yml&sample=react-my-sites-hub&authors=@Sandeep-FED&title=react-my-sites-hub%20-%20).
100+
101+
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-my-sites-hub&template=question.yml&sample=react-my-sites-hub&authors=@Sandeep-FED&title=react-my-sites-hub%20-%20).
102+
103+
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-my-sites-hub&template=question.yml&sample=react-my-sites-hub&authors=@Sandeep-FED&title=react-my-sites-hub%20-%20).
104+
105+
## Disclaimer
106+
107+
**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.**
108+
109+
![react-my-sites-hub](https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-extensions/samples/react-my-sites-hub)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[
2+
{
3+
"name": "pnp-sp-dev-spfx-extensions-react-my-sites-hub",
4+
"source": "pnp",
5+
"title": "My Sites Hub",
6+
"shortDescription": "My Sites Hub is a SharePoint Framework (SPFx) Application Customizer Extension that provides users with a centralized “My Sites” dashboard accessible directly from any SharePoint site.",
7+
"url": "https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-my-sites-hub",
8+
"longDescription": [
9+
"My Sites Hub is a SharePoint Framework (SPFx) Application Customizer Extension that provides users with a centralized “My Sites” dashboard accessible directly from any SharePoint site."
10+
],
11+
"creationDateTime": "2025-10-30",
12+
"updateDateTime": "2025-10-30",
13+
"products": [
14+
"SharePoint"
15+
],
16+
"metadata": [
17+
{
18+
"key": "CLIENT-SIDE-DEV",
19+
"value": "React"
20+
},
21+
{
22+
"key": "SPFX-VERSION",
23+
"value": "1.21.1"
24+
}
25+
],
26+
"tags": [],
27+
"categories": [
28+
"SPFX-APPLICATION-EXTENSION"
29+
],
30+
"thumbnails": [
31+
{
32+
"name": "screenshot1.png",
33+
"type": "image",
34+
"order": 100,
35+
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-my-sites-hub/assets/screenshot1.png",
36+
"alt": "Web Part Preview"
37+
},
38+
{
39+
"name": "screenshot2.png",
40+
"type": "image",
41+
"order": 101,
42+
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-my-sites-hub/assets/screenshot2.png",
43+
"alt": "Web Part Preview"
44+
}
45+
],
46+
"authors": [
47+
{
48+
"gitHubAccount": "https://github.com/Sandeep-FED",
49+
"pictureUrl": "https://github.com/Sandeep-FED.png",
50+
"name": "Sandeep P S"
51+
}
52+
],
53+
"references": [
54+
{
55+
"name": "Overview of SharePoint Framework Extensions",
56+
"description": "You can use SharePoint Framework (SPFx) Extensions to extend the SharePoint user experience. With SPFx Extensions, you can customize more facets of the SharePoint experience, including notification areas, toolbars, and list data views. SPFx Extensions are available in all Microsoft 365 subscriptions for production usage.",
57+
"url": "https://learn.microsoft.com/sharepoint/dev/spfx/extensions/overview-extensions?WT.mc_id=m365-15741-cxa"
58+
},
59+
{
60+
"name": "Use page placeholders from Application Customizer",
61+
"description": "Application Customizers provide access to well-known locations on SharePoint pages that you can modify based on your business and functional requirements. For example, you can create dynamic header and footer experiences that render across all the pages in SharePoint Online.",
62+
"url": "https://learn.microsoft.com/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions?WT.mc_id=m365-15741-cxa"
63+
}
64+
]
65+
}
66+
]
1.48 MB
Loading

0 commit comments

Comments
 (0)