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

Adds SVG to Json for SharePoint List Web Part #5338

Open
wants to merge 98 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
35560f9
adds first draft of a webpart sample
LuiseFreese Oct 16, 2024
88921f7
Automated samples.json update
actions-user Oct 16, 2024
2384acc
modifies sample to also display a preview of the SVG
LuiseFreese Oct 16, 2024
a870011
Merge branch 'main' of https://github.com/LuiseFreese/sp-dev-fx-webparts
LuiseFreese Oct 16, 2024
79b89ac
implements apply to a column on a list of your choice in a given site…
LuiseFreese Oct 16, 2024
4c30127
some debugging and solidifying
LuiseFreese Oct 16, 2024
94c08b3
adds info about new features in Readme and addds video and image
LuiseFreese Oct 16, 2024
aebee9e
attempts to fix link
LuiseFreese Oct 16, 2024
8262311
attempts to fix link 2
LuiseFreese Oct 16, 2024
2284bfa
attempts to fix link 3
LuiseFreese Oct 16, 2024
ad6cf36
attempts to fix link 4
LuiseFreese Oct 16, 2024
2dd424d
attempts to fix link 4
LuiseFreese Oct 16, 2024
ea29677
attempts to fix link 4
LuiseFreese Oct 16, 2024
552a6c4
adds image
LuiseFreese Oct 16, 2024
2ad57f0
adds property pane with Site URL and libraryName
LuiseFreese Oct 17, 2024
57f5639
rms unneccessary styling, excludes doc libary
LuiseFreese Oct 18, 2024
2ba476c
splits up the logic into several components
LuiseFreese Oct 18, 2024
2f62995
uses PnPjs for fetchSVGfiles
LuiseFreese Oct 18, 2024
4efd404
uses PnP.js for applyColumnFormatting
LuiseFreese Oct 18, 2024
3a6190e
uses PnP.js for fetching listcolumns
LuiseFreese Oct 18, 2024
6dbd58c
adds option to select the site the format shall be applied to
LuiseFreese Oct 19, 2024
2cc94ed
adjusts readme to reflect site selector
LuiseFreese Oct 19, 2024
7bbd0de
moves handleFileChange to SVGInput
LuiseFreese Oct 19, 2024
0205f96
moves applyColumnFormat to ApplyButton.tsx
LuiseFreese Oct 19, 2024
4340a32
adsjusts property pane to tell users what they need to do
LuiseFreese Oct 19, 2024
d21db08
adds aria labels for better accessibility
LuiseFreese Oct 19, 2024
2416f04
comments
LuiseFreese Oct 19, 2024
23241e7
separates ListColumnSelector in ListSelector and ColumnSelector
LuiseFreese Oct 19, 2024
6ad68df
big fix that precented the apply btn to work correctly
LuiseFreese Oct 19, 2024
d562849
adds custom hooks to fetch lists and columns
LuiseFreese Oct 19, 2024
e389586
typo fixes in README
LuiseFreese Oct 19, 2024
5b64f2b
adds reset feature to applybutton
LuiseFreese Oct 19, 2024
bcbb2b3
applies bug fix that prevented applyColumn to work properly
LuiseFreese Oct 19, 2024
cf60e71
adds pic and ref to blog to readme
LuiseFreese Oct 19, 2024
1ed2362
first attempt to make it also work in Teams
LuiseFreese Oct 19, 2024
e96c059
fixes styling issues and minor bugs
LuiseFreese Oct 20, 2024
2cb262e
small UI improvement wit accordeon
LuiseFreese Oct 20, 2024
d6d62bc
moves Teams configuration to child component
LuiseFreese Oct 20, 2024
6c41101
basic usage in Teams prep and updatew of readme
LuiseFreese Oct 20, 2024
7440bde
adds imgae
LuiseFreese Oct 20, 2024
933f9d9
corrects link for image
LuiseFreese Oct 20, 2024
a2b6ade
adds minimal validation of property pane values.
LuiseFreese Oct 21, 2024
bd1bc9a
PnPjs improvements
LuiseFreese Oct 21, 2024
3b571e0
prepares for loc
LuiseFreese Oct 21, 2024
f48bb06
no no hard coded strings anymore
LuiseFreese Nov 1, 2024
6c3460f
Automated samples.json update
actions-user Nov 1, 2024
3c497f5
adds docs
LuiseFreese Nov 1, 2024
4cc859e
Merge branch 'main' of https://github.com/LuiseFreese/sp-dev-fx-webparts
LuiseFreese Nov 1, 2024
325ab90
:bulb: elaborates on component logic, adds mermaid
LuiseFreese Nov 1, 2024
da9e9f8
:bulb: elaborates on component logic, adds mermaid
LuiseFreese Nov 1, 2024
35a9848
:fire: removes old toggleswitch
LuiseFreese Nov 1, 2024
4470b5a
hooks and service
LuiseFreese Nov 2, 2024
e4154f6
:art: creates useFetchSites hook
LuiseFreese Nov 2, 2024
ac9be97
:speech_balloon: improves localization
LuiseFreese Nov 2, 2024
125e6d1
:speech_balloon: improves localization
LuiseFreese Nov 2, 2024
cd91899
:sparkles: new genz locale and new de-de locale
LuiseFreese Nov 2, 2024
b2533e3
:bug: adds strings in locale files
LuiseFreese Nov 2, 2024
4c63e74
:memo: adds info on multilanguage to readme
LuiseFreese Nov 2, 2024
f9130f6
:memo: clarifies readme
LuiseFreese Nov 2, 2024
26c03de
:tada: early draft of ultimate listformatting webpart
LuiseFreese Nov 3, 2024
bbdb65b
:zap: adds pagination to gallery
LuiseFreese Nov 3, 2024
04399f2
:see_no_evil: adds env
LuiseFreese Nov 3, 2024
e0d6fee
:bug: debugs pagination
LuiseFreese Nov 4, 2024
42667fd
:bug: fixes pagination
LuiseFreese Nov 4, 2024
5a95897
:art: 4 rows of items in gallerty, fixes apply button hook
LuiseFreese Nov 4, 2024
1c943cd
:sparkles: adds author name and profile pic
LuiseFreese Nov 4, 2024
6db9c14
Revert ":sparkles: adds author name and profile pic"
LuiseFreese Nov 4, 2024
a93b5ba
:sparkles: adds author name and profile pic
LuiseFreese Nov 4, 2024
5873128
:sparkles: adds search
LuiseFreese Nov 4, 2024
1484508
:sparkles: adds modal
LuiseFreese Nov 7, 2024
520b4dc
:bug: fixes open in github link
LuiseFreese Nov 8, 2024
ac7deac
:ambulance: replaces fake token with placeholder
LuiseFreese Nov 8, 2024
47a6fe0
Automated samples.json update
actions-user Nov 8, 2024
4451efb
:zap: adds browser caching and lazy loading
LuiseFreese Nov 8, 2024
3297be5
Merge branch 'main' of https://github.com/LuiseFreese/sp-dev-fx-webparts
LuiseFreese Nov 8, 2024
bf7fa51
:heavy_plus_sign: adds octokit
LuiseFreese Nov 8, 2024
d23480b
:memo: adds Readme information
LuiseFreese Nov 8, 2024
2f61d67
:zap: fixes search
LuiseFreese Nov 8, 2024
473a9a1
:art: creates hooks for SampleSelection, Pagination, Modal
LuiseFreese Nov 8, 2024
1f1587a
:memo: updates mermaid
LuiseFreese Nov 8, 2024
db64bbb
:memo: updates mermaid 2
LuiseFreese Nov 8, 2024
9f0282e
:sparkles: adds provide feedback option.
LuiseFreese Nov 9, 2024
889993f
:lipstick: polishes description
LuiseFreese Nov 9, 2024
ad71d9c
:memo: lets mermaid and features align with recent changes
LuiseFreese Nov 9, 2024
f58b565
adds tourfile
LuiseFreese Nov 10, 2024
f805a54
:fire: removes 2nd sample for now
LuiseFreese Nov 10, 2024
94216dc
:memo: adds nvmrc file
LuiseFreese Nov 10, 2024
ffd0d1e
:tada: first draft of bluesky web part
LuiseFreese Nov 12, 2024
b7247ef
:tada: creates first draft of Bluesky webpart
LuiseFreese Nov 12, 2024
803b22e
Revert ":tada: creates first draft of Bluesky webpart"
LuiseFreese Nov 12, 2024
b85d554
Merge branch 'pnp:main' into main
LuiseFreese Nov 12, 2024
bbbdb20
Merge branch 'main' of https://github.com/LuiseFreese/sp-dev-fx-webparts
LuiseFreese Nov 12, 2024
fdc2989
:memo: provides Readme info
LuiseFreese Nov 12, 2024
c3e2291
removes bluesky sample from PR
LuiseFreese Nov 18, 2024
c7c9e19
:fire: adds bluesky web part sample with basic features
LuiseFreese Nov 19, 2024
c31dfbe
:sparkles: adds feature to LIKE posts
LuiseFreese Nov 20, 2024
62daecf
:bug: fixes sharecount
LuiseFreese Nov 20, 2024
3b1c809
Merge branch 'main' into main
hugoabernier Nov 26, 2024
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-bluesky/.eslintrc.js

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions samples/react-bluesky/.gitignore
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
16 changes: 16 additions & 0 deletions samples/react-bluesky/.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-bluesky/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.4
24 changes: 24 additions & 0 deletions samples/react-bluesky/.yo-rc.json
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
}
}
92 changes: 92 additions & 0 deletions samples/react-bluesky/README.md
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
18 changes: 18 additions & 0 deletions samples/react-bluesky/config/config.json
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"
}
}
7 changes: 7 additions & 0 deletions samples/react-bluesky/config/deploy-azure-storage.json
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 -->"
}
4 changes: 4 additions & 0 deletions samples/react-bluesky/config/env.json
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"
}
40 changes: 40 additions & 0 deletions samples/react-bluesky/config/package-solution.json
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"
}
}
3 changes: 3 additions & 0 deletions samples/react-bluesky/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"
}
6 changes: 6 additions & 0 deletions samples/react-bluesky/config/serve.json
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"
}
4 changes: 4 additions & 0 deletions samples/react-bluesky/config/write-manifests.json
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 -->"
}
17 changes: 17 additions & 0 deletions samples/react-bluesky/gulpfile.js
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'));
Loading
Loading