Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade react-application-breadcrumb to SPFx v1.20.0 #1419

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 319 additions & 0 deletions samples/react-application-breadcrumb/.eslintrc.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions samples/react-application-breadcrumb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules

# Build generated files
dist
lib
release
solution
temp
*.sppkg
.heft

# Coverage directory used by tools like istanbul
coverage

# OSX
.DS_Store

# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj

# Resx Generated Code
*.resx.ts

# Styles Generated Code
*.scss.ts
16 changes: 16 additions & 0 deletions samples/react-application-breadcrumb/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!dist
config

gulpfile.js

release
src
temp

tsconfig.json
tslint.json

*.log

.yo-rc.json
.vscode
1 change: 1 addition & 0 deletions samples/react-application-breadcrumb/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.4
29 changes: 16 additions & 13 deletions samples/react-application-breadcrumb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ extensions:

This sample shows how to create a breadcrumb element and append it to your site via the SharePoint Framework Application Customizer extension.

![Breadcrumb sample](./assets/breadcrumb-sample.png)
![1727992607183](image/README/1727992607183.png)

## Used SharePoint Framework Version

![SPFx 1.11](https://img.shields.io/badge/version-1.11.0-green.svg)
![SPFx 1.20.0](https://img.shields.io/badge/version-1.20.0-green.svg)

## Applies to

Expand All @@ -32,18 +32,20 @@ This sample shows how to create a breadcrumb element and append it to your site

## Solution

Solution|Author(s)
--------|---------
React-application-breadcrumb | Elio Struyf (MVP, U2U, [@eliostruyf](https://twitter.com/eliostruyf))
React-application-breadcrumb | Swaminathan Sriram ([@SwaminathanSri3](https://twitter.com/SwaminathanSri3)) -- Upgrade to SPFx 1.11
| Solution | Author(s) |
| ----------------------------------- | ------------------------------------------------------------------------------------------------- |
| React-application-breadcrumb | Elio Struyf (MVP, U2U,[@eliostruyf](https://twitter.com/eliostruyf)) |
| React-application-breadcrumb | Swaminathan Sriram ([@SwaminathanSri3](https://twitter.com/SwaminathanSri3)) -- Upgrade to SPFx 1.11 |
| [email protected] | Thomas Daly (MVP, [@\_tomdaly\_](https://twitter.com/_tomdaly_)) |

## Version history

Version|Date|Comments
-------|----|--------
2.0|October 3, 2020|Updated to SPFx v1.11
1.1|August 31, 2017|Updates for v1.2.0
1.0|August 9, 2017|Initial release
| Version | Date | Comments |
| ------- | ---------------- | ----------------------------------------------------------- |
| 2.1 | October 10, 2024 | Upgrade SPFx from v1.11 to v1.20.0, update to use Fluent UI |
| 2.0 | October 3, 2020 | Updated to SPFx v1.11 |
| 1.1 | August 31, 2017 | Updates for v1.2.0 |
| 1.0 | August 9, 2017 | Initial release |

## Disclaimer

Expand All @@ -57,7 +59,7 @@ Version|Date|Comments
- Move to folder where this readme exists
- In the command window run:
- `npm install`
- `gulp serve --nobrowser`
- `gulp serve --nobrowser`
- Open your SharePoint developer site and append the provided query string parameters from the command output

> If you want, you can also test bundle and package it. The necessary feature configuration has already been done.
Expand All @@ -73,8 +75,9 @@ Here's a debug URL for testing around this sample.
## Features

This project contains SharePoint Framework extensions that illustrates next features:

* Calling the SharePoint REST APIs
* Using React components in SharePoint Framework application customizer extensions
* Using an Office UI Fabric component to built the site breadcrumb component
* Using Fluent UI React library to build the site breadcrumb component

<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-extensions/samples/react-application-breadcrumb" />
6 changes: 3 additions & 3 deletions samples/react-application-breadcrumb/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"This sample shows how to create a breadcrumb element and append it to your site via the SharePoint Framework Application Customizer extension."
],
"creationDateTime": "2020-10-03",
"updateDateTime": "2020-10-03",
"updateDateTime": "2024-10-05",
"products": [
"SharePoint"
],
Expand All @@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.11.0"
"value": "1.20.0"
}
],
"tags": [],
Expand Down Expand Up @@ -64,4 +64,4 @@
}
]
}
]
]
4 changes: 0 additions & 4 deletions samples/react-application-breadcrumb/config/copy-assets.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/",
"workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "site-breadcrumb-extension",
"accessKey": "<!-- ACCESS KEY -->"
Expand Down
32 changes: 22 additions & 10 deletions samples/react-application-breadcrumb/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,39 @@
"solution": {
"name": "site-breadcrumb-extension-client-side-solution",
"id": "4d6b2847-ccab-4778-9b3a-0e9ea58d88a9",
"version": "2.0.0.0",
"version": "2.1.0.0",
"isDomainIsolated": false,
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"developer": {
"name": "",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": "Undefined-1.20.0"
},
"metadata": {
"shortDescription": {
"default": "site-breadcrumb-extension description"
},
"longDescription": {
"default": "site-breadcrumb-extension description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [{
"title": "SharePoint Framework Breadcrumb Extension",
"description": "Deploys the Breadcrumb custom action to the site",
"id": "52d8511d-f447-4b3b-b087-d82b861861a1",
"version": "2.0.0.0",
"version": "2.1.0.0",
"assets": {
"elementManifests": [
"elements.xml"
]
}
}],
"developer": {
"name": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"websiteUrl": "",
"mpnId": ""
}
}]
},
"paths": {
"zippedPackage": "solution/site-breadcrumb-extension.sppkg"
Expand Down
3 changes: 3 additions & 0 deletions samples/react-application-breadcrumb/config/sass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
24 changes: 20 additions & 4 deletions samples/react-application-breadcrumb/config/serve.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
"port": 4321,
"initialPage": "https://localhost:5432/workbench",
"https": true,
"api": {
"port": 5432,
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
"serveConfigurations": {
"default": {
"pageUrl": "https://{tenantDomain}/SitePages/myPage.aspx",
"customActions": {
"57fa430d-8154-4b00-b285-679314f4f390": {
"location": "ClientSideExtension.ApplicationCustomizer",
"properties": {}
}
}
},
"siteBreadcrumb": {
"pageUrl": "https://{tenantDomain}/SitePages/myPage.aspx",
"customActions": {
"57fa430d-8154-4b00-b285-679314f4f390": {
"location": "ClientSideExtension.ApplicationCustomizer",
"properties": {}
}
}
}
}
}
37 changes: 0 additions & 37 deletions samples/react-application-breadcrumb/gulpfile-serve-info.js

This file was deleted.

14 changes: 10 additions & 4 deletions samples/react-application-breadcrumb/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
'use strict';

const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');

build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
require('./gulpfile-serve-info');

build.initialize(gulp);
var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);

result.set('serve', result.get('serve-deprecated'));

return result;
};

gulp.tasks['serve-info'].dep.push('serve');
build.initialize(require('gulp'));
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading