-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 adds bluesky web part sample with basic features
- Loading branch information
1 parent
c3e2291
commit c7c9e19
Showing
35 changed files
with
29,843 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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 | ||
|
||
<<<<<<< Updated upstream:samples/react-bluesky/.gitignore | ||
# Environment variables | ||
.env | ||
======= | ||
# .env files | ||
.env | ||
>>>>>>> Stashed changes:samples/listformatter/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.20.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"@microsoft/generator-sharepoint": { | ||
"whichFolder": "subdir", | ||
"solutionName": "BlueskyViewer", | ||
"componentType": "webpart", | ||
"template": "react", | ||
"componentName": "BlueSky", | ||
"plusBeta": false, | ||
"isCreatingSolution": true, | ||
"nodeVersion": "18.20.4", | ||
"sdksVersions": { | ||
"@microsoft/microsoft-graph-client": "3.0.2", | ||
"@microsoft/teams-js": "2.24.0" | ||
}, | ||
"version": "1.20.0", | ||
"libraryName": "bluesky-viewer", | ||
"libraryId": "e6645216-311a-4108-b981-19acbaf75ca8", | ||
"environment": "spo", | ||
"packageManager": "npm", | ||
"solutionShortDescription": "BlueskyViewer description", | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# BlueSky Viewer | ||
|
||
## Summary | ||
|
||
The BlueSky Viewer is a SharePoint Framework (SPFx) web part designed to display posts from the Bluesky social network. It leverages React and Fluent UI to provide a modern and responsive user interface. The Web Part fetches posts using the Bluesky API and displays them in a card format, including the author's information, content, images, and timestamp. | ||
|
||
## Features | ||
|
||
- **Fetch and Display Posts**: Retrieves posts from the BlueSky API and displays them in a card layout. | ||
- **Author Information**: Shows the author's avatar and display name. | ||
- **Content Rendering**: Displays the post content with support for hashtags. | ||
- **Image Section**: Renders images associated with the post. | ||
- **Timestamp**: Shows the timestamp of when the post was created. | ||
- **Error Handling**: Displays error messages if there are issues fetching the posts. | ||
|
||
## Component Structure | ||
|
||
```mermaid | ||
graph TD | ||
BlueSky --> BlueSkyAuthorSection | ||
BlueSky --> BlueSkyContentSection | ||
BlueSky --> BlueSkyImageSection | ||
BlueSky --> BlueSkyTimestampSection | ||
BlueSky --> useAccessToken | ||
BlueSky --> useBlueSkyPosts | ||
``` | ||
|
||
## Used SharePoint Framework Version | ||
|
||
![version](https://img.shields.io/badge/version-1.20.0-green.svg) | ||
|
||
## Applies to | ||
|
||
- [SharePoint Framework](https://aka.ms/spfx) | ||
- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
|
||
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram) | ||
## Prerequisites | ||
|
||
> Any special pre-requisites? | ||
## Solution | ||
|
||
| Solution | Author(s) | | ||
| ----------- | ------------------------------------------------------- | | ||
| folder name | Author details (name, company, twitter alias with link) | | ||
|
||
## Version history | ||
|
||
| Version | Date | Comments | | ||
| ------- | ---------------- | --------------- | | ||
| 1.1 | March 10, 2021 | Update comment | | ||
| 1.0 | January 29, 2021 | Initial release | | ||
|
||
## 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.** | ||
|
||
--- | ||
|
||
## Minimal Path to Awesome | ||
|
||
- Clone this repository | ||
- Ensure that you are at the solution folder | ||
- in the command-line run: | ||
- **npm install** | ||
- **gulp serve** | ||
|
||
> Include any additional steps as needed. | ||
## Features | ||
|
||
Description of the extension that expands upon high-level summary above. | ||
|
||
This extension illustrates the following concepts: | ||
|
||
- topic 1 | ||
- topic 2 | ||
- topic 3 | ||
|
||
> Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance. | ||
> Share your web part with others through Microsoft 365 Patterns and Practices program to get visibility and exposure. More details on the community, open-source projects and other activities from http://aka.ms/m365pnp. | ||
## References | ||
|
||
- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
- [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview) | ||
- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis) | ||
- [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview) | ||
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", | ||
"version": "2.0", | ||
"bundles": { | ||
"blue-sky-web-part": { | ||
"components": [ | ||
{ | ||
"entrypoint": "./lib/webparts/blueSky/BlueSkyWebPart.js", | ||
"manifest": "./src/webparts/blueSky/BlueSkyWebPart.manifest.json" | ||
} | ||
] | ||
} | ||
}, | ||
"externals": {}, | ||
"localizedResources": { | ||
"BlueSkyWebPartStrings": "lib/webparts/blueSky/loc/{locale}.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", | ||
"workingDir": "./release/assets/", | ||
"account": "<!-- STORAGE ACCOUNT NAME -->", | ||
"container": "bluesky-viewer", | ||
"accessKey": "<!-- ACCESS KEY -->" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"REACT_APP_BSKY_HANDLE": "luisedev.bsky.social", | ||
"REACT_APP_BSKY_APP_PASSWORD": "w5sn-i7oa-3rys-jcjm" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", | ||
"solution": { | ||
"name": "bluesky-viewer-client-side-solution", | ||
"id": "e6645216-311a-4108-b981-19acbaf75ca8", | ||
"version": "1.0.0.0", | ||
"includeClientSideAssets": true, | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"developer": { | ||
"name": "", | ||
"websiteUrl": "", | ||
"privacyUrl": "", | ||
"termsOfUseUrl": "", | ||
"mpnId": "Undefined-1.20.0" | ||
}, | ||
"metadata": { | ||
"shortDescription": { | ||
"default": "BlueskyViewer description" | ||
}, | ||
"longDescription": { | ||
"default": "BlueskyViewer description" | ||
}, | ||
"screenshotPaths": [], | ||
"videoUrl": "", | ||
"categories": [] | ||
}, | ||
"features": [ | ||
{ | ||
"title": "bluesky-viewer Feature", | ||
"description": "The feature that activates elements of the bluesky-viewer solution.", | ||
"id": "d7842dc3-5ef1-4cf8-a806-99143273c9ba", | ||
"version": "1.0.0.0" | ||
} | ||
] | ||
}, | ||
"paths": { | ||
"zippedPackage": "solution/bluesky-viewer.sppkg" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json", | ||
"port": 4321, | ||
"https": true, | ||
"initialPage": "https://hscluise.sharepoint.com/_layouts/workbench.aspx" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json", | ||
"cdnBasePath": "<!-- PATH TO CDN -->" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
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.`); | ||
|
||
var getTasks = build.rig.getTasks; | ||
build.rig.getTasks = function () { | ||
var result = getTasks.call(build.rig); | ||
|
||
result.set('serve', result.get('serve-deprecated')); | ||
|
||
return result; | ||
}; | ||
|
||
build.initialize(require('gulp')); |
Oops, something went wrong.