Skip to content

Commit c76154e

Browse files
Adam-itDevPio
andauthored
Release v4.1.0 (#310)
## 🎯 Aim The aim is to prepare new minor release with latest changes added like: more guidance regarding gulp tasks and in scaffolding form, more gulp tasks. renamed actions, added support for SPFx 1.20 etc. ## 📷 Result ![GulpTasks1](https://github.com/user-attachments/assets/026e631b-221d-4914-b56b-1896365e328b) ![Upgrade1](https://github.com/user-attachments/assets/3b698065-ba2e-4c98-b217-8e05ecbbd710) ![GuidanceScaffolding](https://github.com/user-attachments/assets/db879bbc-2b9e-4091-9b94-cf8a9402ee3a) ## ✅ What was done - [X] Added support for SPFx 1.20 ⭐ Upgrade and Validate your SPFx projects - [X] Added dedicated step in the walkthrough explaining Gulp Tasks - [X] Added more Gulp Tasks to the tasks panel - [X] Added guidance for each project type in scaffolding form - [X] Refactored action naming - [X] Refactored to hide features that do not work without login --------- Co-authored-by: Luccas Castro <[email protected]>
1 parent be8a374 commit c76154e

25 files changed

+279
-116
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Change Log
22

3+
## [4.1.0] - 2024-09-28
4+
5+
- Added support for SPFx 1.20.0
6+
- Updated missing scopes in the Entra App Registration
7+
- Updated error handling in extension init
8+
- Added guidance in tha scaffolding form for each SPFx project type
9+
- Added more gulp tasks
10+
- Added dedicated walkthrough for gulp tasks
11+
- Updated extension to hide features that require sign in
12+
- Updated action naming
13+
314
## [4.0.0] - 2024-09-08
415

516
- Updated Sign in method

assets/images/tasks.png

4.3 KB
Loading

assets/walkthrough/tasks-and-actions.md assets/walkthrough/actions.md

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
## Gulp tasks
2-
3-
The extension shows all possible Gulp tasks one may run on an SPFx project. The tasks allow you to clean, bundle, package, serve the project with a single click.
4-
5-
![Gulp Tasks](../images/tasks.png)
6-
7-
[Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.4-Gulp-tasks)
8-
91
## Actions
102

113
The actions section allows unique functionalities that may significantly boost productivity when working with SPFx projects.

assets/walkthrough/tasks.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Gulp tasks
2+
3+
The SharePoint Framework uses [Gulp](https://gulpjs.com/) as its task runner to handle building, bundling, and packaging of the client-side solution project.
4+
5+
The toolchain consists of the following gulp tasks defined in the @microsoft/sp-build-core-tasks package:
6+
7+
build - Builds the client-side solution project.
8+
bundle - Bundles the client-side solution project entry point and all its dependencies into a single JavaScript file.
9+
serve - Serves the client-side solution project and assets from the local machine.
10+
clean - Cleans the client-side solution project's build artifacts from the previous build and from the build target directories (lib and dist).
11+
test - Runs unit tests, if available, for the client-side solution project.
12+
package-solution - Packages the client-side solution into a SharePoint package.
13+
deploy-azure-storage - Deploys client-side solution project assets to Azure Storage.
14+
15+
16+
SPFx Toolkit VS Code extension shows all possible Gulp tasks one may run on an SPFx project. Don't worry about remembering all the commands, just click on the task you want to run and the extension will do the rest.
17+
18+
![Gulp Tasks](../images/tasks.png)
19+
20+
[Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.4-Gulp-tasks)

npm-shrinkwrap.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+16-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "viva-connections-toolkit",
33
"displayName": "SharePoint Framework Toolkit",
44
"description": "SharePoint Framework Toolkit aims to boost your productivity in developing and managing SharePoint Framework solutions helping at every stage of your development flow, from setting up your development workspace to deploying a solution straight to your tenant without the need to leave VS Code and now even create a CI/CD pipeline to introduce automate deployment of your app. This toolkit is provided by the community.",
5-
"version": "4.0.0",
5+
"version": "4.1.0",
66
"publisher": "m365pnp",
77
"preview": false,
88
"homepage": "https://github.com/pnp/vscode-viva",
@@ -109,11 +109,19 @@
109109
}
110110
},
111111
{
112-
"id": "tasks-and-actions",
112+
"id": "tasks",
113+
"title": "Gulp tasks",
114+
"description": "Get to know the Gulp tasks that are available in your SharePoint Framework project",
115+
"media": {
116+
"markdown": "assets/walkthrough/tasks.md"
117+
}
118+
},
119+
{
120+
"id": "actions",
113121
"title": "Boost your development with actions",
114-
"description": "Reduce the amount of context switching and automate your work with Tasks and Actions. \nValidate your project, rename your solution, deploy it to any app catalog, grant API permissions ... and many more all without leaving the context of your work.",
122+
"description": "Reduce the amount of context switching and automate your work with Actions. \nValidate your project, rename your solution, deploy it to any app catalog, grant API permissions ... and many more all without leaving the context of your work.",
115123
"media": {
116-
"markdown": "assets/walkthrough/tasks-and-actions.md"
124+
"markdown": "assets/walkthrough/actions.md"
117125
}
118126
},
119127
{
@@ -314,12 +322,12 @@
314322
},
315323
{
316324
"command": "spfx-toolkit.upgradeProject",
317-
"title": "Upgrade project to latest SPFx version",
325+
"title": "Upgrade project SPFx version",
318326
"category": "SharePoint Framework Toolkit"
319327
},
320328
{
321329
"command": "spfx-toolkit.deployProject",
322-
"title": "Deploy the project",
330+
"title": "Deploy project to app catalog",
323331
"category": "SharePoint Framework Toolkit"
324332
},
325333
{
@@ -329,7 +337,7 @@
329337
},
330338
{
331339
"command": "spfx-toolkit.validateProject",
332-
"title": "Validate project",
340+
"title": "Validate project correctness",
333341
"category": "SharePoint Framework Toolkit"
334342
},
335343
{
@@ -344,7 +352,7 @@
344352
},
345353
{
346354
"command": "spfx-toolkit.pipeline",
347-
"title": "Generate CI/CD workflow",
355+
"title": "Scaffold CI/CD Workflow",
348356
"category": "SharePoint Framework Toolkit"
349357
},
350358
{

src/chat/PromptHandlers.ts

+21-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as vscode from 'vscode';
22
import { Commands, promptCodeContext, promptContext, promptNewContext, promptSetupContext } from '../constants';
3+
import { ProjectInformation } from '../services/dataType/ProjectInformation';
34

45
const MODEL_SELECTOR: vscode.LanguageModelChatSelector = { vendor: 'copilot', family: 'gpt-4' };
56

@@ -54,23 +55,26 @@ export class PromptHandlers {
5455
title: vscode.l10n.t('View samples'),
5556
}];
5657
case 'code':
57-
// TODO: make visible only in context of a project
58-
return [{
59-
command: Commands.upgradeProject,
60-
title: vscode.l10n.t('Get upgrade guidance to latest SPFx version'),
61-
},
62-
{
63-
command: Commands.validateProject,
64-
title: vscode.l10n.t('Validate your project'),
65-
},
66-
{
67-
command: Commands.renameProject,
68-
title: vscode.l10n.t('Rename your project'),
69-
},
70-
{
71-
command: Commands.pipeline,
72-
title: vscode.l10n.t('Create a CI/CD workflow'),
73-
}];
58+
if(ProjectInformation.isSPFxProject) {
59+
return [{
60+
command: Commands.upgradeProject,
61+
title: vscode.l10n.t('Get upgrade guidance to latest SPFx version'),
62+
},
63+
{
64+
command: Commands.validateProject,
65+
title: vscode.l10n.t('Validate your project'),
66+
},
67+
{
68+
command: Commands.renameProject,
69+
title: vscode.l10n.t('Rename your project'),
70+
},
71+
{
72+
command: Commands.pipeline,
73+
title: vscode.l10n.t('Create a CI/CD workflow'),
74+
}];
75+
}
76+
77+
return [];
7478
default:
7579
return [];
7680
}

src/constants/AdaptiveCardTypes.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
export const AdaptiveCardTypes = [
22
{
33
name: 'Generic Card Template',
4-
value: 'Generic'
4+
value: 'Generic',
5+
description: "A flexible template that can be customized for various use cases, displaying general information and content in an adaptive card format."
56
},
67
{
78
name: 'Search Query Modifier',
8-
value: 'Search'
9+
value: 'Search',
10+
description: "A template designed to modify and enhance search queries, improving the relevance and accuracy of search results displayed in adaptive cards."
911
},
1012
{
1113
name: 'Data Visualization Card Template',
12-
value: 'DataVisualization'
14+
value: 'DataVisualization',
15+
description: "A template focused on presenting data visualizations, such as charts and graphs, within adaptive cards to provide clear and insightful data representations."
16+
1317
}
1418
];

src/constants/ComponentTypes.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,27 @@ export enum ComponentType {
99
export const ComponentTypes = [
1010
{
1111
name: 'Web Part',
12-
value: ComponentType.webPart
12+
value: ComponentType.webPart,
13+
description:
14+
'SharePoint Framework (SPFx) client-side web parts are built with modern tools and frameworks, and can be deployed to modern and classic SharePoint pages. They are the building blocks of pages that appear on a SharePoint site. They also enable extending Microsoft Teams tabs, providing powerful ways to enhance both SharePoint and Teams.'
15+
1316
},
1417
{
1518
name: 'Extension',
16-
value: ComponentType.extension
19+
value: ComponentType.extension,
20+
description:
21+
'SharePoint Framework (SPFx) Extensions let you enhance SharePoint user experience by customizing toolbars, list views, forms, and notifications. They work with frameworks like React and Angular, and include four main types: Application Customizers, Field Customizers, Command Sets, and Form Customizers.'
1722
},
1823
{
1924
name: 'Library',
20-
value: ComponentType.library
25+
value: ComponentType.library,
26+
description:
27+
'SharePoint Framework (SPFx) library is a component that allows you to create and share reusable code across multiple components within a tenant, providing a way to manage and reference common functionality.'
2128
},
2229
{
2330
name: 'Adaptive Card Extension',
24-
value: ComponentType.adaptiveCardExtension
31+
value: ComponentType.adaptiveCardExtension,
32+
description:
33+
'ACEs are the primary way to extend Viva Connections and SharePoint. They use the Adaptive Card Framework with a JSON schema to create a unified UI, managed by Microsoft, allowing you to focus on business logic.',
2534
}
2635
];

src/constants/ExtensionTypes.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,31 @@ export const ExtensionTypes = [
1111
{
1212
name: 'Application Customizer',
1313
value: ExtensionType.application,
14-
templates: []
14+
templates: [],
15+
description: 'Adds scripts to the page, and accesses well-known HTML element placeholders and extends them with custom renderings.'
1516
},
1617
{
1718
name: 'Field Customizer',
1819
value: ExtensionType.field,
19-
templates: ['No framework', 'React', 'Minimal']
20+
templates: ['No framework', 'React', 'Minimal'],
21+
description: 'Provides modified views to data for fields within a list.'
2022
},
2123
{
2224
name: 'ListView Command Set',
2325
value: ExtensionType.listViewCommandSet,
24-
templates: []
26+
templates: [],
27+
description: 'Extends the SharePoint command surfaces to add new actions, and provides client-side code that you can use to implement behaviors.'
2528
},
2629
{
2730
name: 'Form Customizer',
2831
value: ExtensionType.formCustomizer,
29-
templates: ['No framework', 'React']
32+
templates: ['No framework', 'React'],
33+
description: 'Provides a way to associate and override default new, edit and view form experience of list and libraries with custom forms by associating component to content type.'
3034
},
3135
{
3236
name: 'Search Query Modifier',
3337
value: ExtensionType.searchQueryModifier,
34-
templates: []
38+
templates: [],
39+
description: 'Modifies search queries to enhance search results.'
3540
}
3641
];

src/constants/FrameworkTypes.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ export enum FrameworkType {
88
export const FrameworkTypes = [
99
{
1010
name: 'No framework',
11-
value: FrameworkType.none
11+
value: FrameworkType.none,
12+
description:
13+
"Use any library or write pure JavaScript for maximum flexibility."
1214
},
1315
{
1416
name: 'React',
15-
value: FrameworkType.react
17+
value: FrameworkType.react,
18+
description:
19+
"Popular library for building dynamic and responsive UI components."
1620
},
1721
{
1822
name: 'Minimal',
19-
value: FrameworkType.minimal
23+
value: FrameworkType.minimal,
24+
description:
25+
"Lightweight setup with minimal dependencies for straightforward functionality."
2026
},
2127
];

0 commit comments

Comments
 (0)