Skip to content

Commit 0262386

Browse files
Adam-itnicodecleyreSaurabh7019ervingayleNishkalankBezawada
authored
Release v4.4.0 (#405)
## 🎯 Aim The aim is to create a new minor release with the latest enhancements. ## 📷 Result ![image](https://github.com/user-attachments/assets/e85c35d6-95bf-4a02-9a9b-0602127472e1) ![image](https://github.com/user-attachments/assets/51fca868-2dbe-4e6f-93fa-9bdea0144f02) ![image](https://github.com/user-attachments/assets/272ed119-91d6-43d7-bcf1-fa711f55fb79) ![image](https://github.com/user-attachments/assets/c16adfdf-6674-45a6-95ba-7bfe50f1a602) ## ✅ What was done - [X] Unfied the gulp bundle local and production to a single task with an additional prompt - [X] Unfied the gulp package-solution local and production to a single task with an additional prompt - [X] Fixed warning message regarding installed Node.js version in validate dependency action - [X] Added conditional logic to scaffolding form additional dependencies to show them based on project type - [X] Added install react additional dependency to the scaffolding form visible for Application customizer - [X] Added Install, and Uninstall apps to a specified site action to app view - [X] Enhanced progress notifications with output window links for better user guidance to every CLI action - [X] Added action which allows to set form customizer - [X] Enhanced error handling in GitHub Copilot Chat participant - [X] Updated welcome view - [X] Updated VS Code typings and engine to latest --------- Co-authored-by: Nico De Cleyre <[email protected]> Co-authored-by: Saurabh Tripathi <[email protected]> Co-authored-by: ErvinGayle <[email protected]> Co-authored-by: Nishkalank Bezawada <[email protected]>
1 parent fa5c5f3 commit 0262386

29 files changed

+453
-34
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Change Log
22

3+
## [4.4.0] - 2025-02-04
4+
5+
- Updated the gulp bundle local and production to a single task with an additional prompt
6+
- Updated the gulp package-solution local and production to a single task with an additional prompt
7+
- Fixed warning message regarding installed Node.js version in validate dependency action
8+
- Added conditional logic to scaffolding form additional dependencies to show them based on project type
9+
- Added install react additional dependency to the scaffolding form visible for Application customizer
10+
- Added Install, and Uninstall apps to a specified site action to app view
11+
- Enhanced progress notifications with output window links for better user guidance to every CLI action
12+
- Added action which allows to set form customizer
13+
- Enhanced error handling in GitHub Copilot Chat participant
14+
- Updated welcome view
15+
- Updated VS Code typings and engine to latest
16+
317
## [4.3.0] - 2024-12-11
418

519
- Added remove confirmation prompt when removing SPFx solution from app catalog

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ After successful sign in, an additional view is presented that shows a list of l
153153
- **Remove**: Removes the app from the app catalog.
154154
- **Enable**: Allows end users to add the solution to their SharePoint sites.
155155
- **Disable**: Hides the solution from end users, preventing them from adding it to sites.
156+
- **Install**: Install the solution from tenant or site collection app catalog to a site.
157+
- **Uninstall**: Uninstall the solution from a site.
156158
- **Upgrade**: Upgrades the solution to the latest version available in the app catalog for the specified site.
157159

158160
Additionally, it will show you all tenant-wide extensions installed on your tenant.
@@ -237,6 +239,12 @@ And the code tour guidance will provide you upgrade tips directly in your code!
237239

238240
[Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#add-new-component)
239241

242+
- **Set Form Customizer** - Allows to update the New, Edit or View from of any SharePoint List to a given SPFx Form Customizer based on provided GUID.
243+
244+
![Set Form Customizer](./assets/images/set-form-customizer-action.png)
245+
246+
[Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#set-form-customizer)
247+
240248
- **Open sample/scenario galleries of the SPFx web part, extensions, or ACEs projects** - SharePoint Framework Toolkit supports a couple of sample galleries that may be used to scaffold a new SPFx project.
241249

242250
[Check out our docs for more details](https://github.com/pnp/vscode-viva/wiki/5.5-Actions#open-samplescenario-galleries-of-the-spfx-web-part-extensions-or-aces-projects)

assets/images/actions.png

1.78 KB
Loading

assets/images/app-catalog-list.png

-3.43 KB
Loading

assets/images/scaffolding.png

107 KB
Loading
358 KB
Loading

assets/images/tasks.png

-1.67 KB
Loading

assets/images/validate-dependency.png

151 KB
Loading

assets/images/walkthrough.png

-216 KB
Loading

assets/images/welcome-experience.png

86.6 KB
Loading

assets/walkthrough/tenant-details.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ After successful sign in, an additional view is presented that shows a list of l
3030
- **Enable**: Allows end users to add the solution to their SharePoint sites.
3131
- **Disable**: Hides the solution from end users, preventing them from adding it to sites.
3232
- **Upgrade**: Upgrades the solution to the latest version available in the app catalog for the specified site.
33+
- **Install**: Install the solution from tenant or site collection app catalog to a site.
34+
- **Uninstall**: Uninstall the solution from a site.
3335

3436
Additionally, it will show you all tenant-wide extensions installed on your tenant.
3537

npm-shrinkwrap.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
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.3.0",
5+
"version": "4.4.0",
66
"publisher": "m365pnp",
77
"preview": false,
88
"homepage": "https://github.com/pnp/vscode-viva",
99
"icon": "assets/logo-large.png",
1010
"engines": {
11-
"vscode": "^1.90.0"
11+
"vscode": "^1.93.0"
1212
},
1313
"categories": [
1414
"Snippets",
@@ -52,7 +52,7 @@
5252
"id": "spfx-toolkit.pnp",
5353
"fullName": "SPFx Toolkit",
5454
"name": "spfx",
55-
"description": "How can I help you with SPFx development?",
55+
"description": "How can I help you with SPFx development? Use /setup, /new, /manage, /code commands for job specific support.",
5656
"isSticky": true,
5757
"commands": [
5858
{
@@ -332,7 +332,7 @@
332332
"viewsWelcome": [
333333
{
334334
"view": "pnp-view-empty",
335-
"contents": "Welcome to SharePoint Framework Toolkit\n\n\nTo start create a new SharePoint Framework project. \n[Create a new project](command:spfx-toolkit.createProject)\n\n\n\n\n\nUse a sample to kick off a new project and boost your development.\n[View samples](command:spfx-toolkit.samplesGallery)\n\n\n\n\n\nYou can also open an existing app.\n[Open folder](command:vscode.openFolder)\n\n\n\n\n\nValidate your local workspace and check if you have the required dependencies.\n[Check dependencies](command:spfx-toolkit.checkDependencies)\n\n\n\n\n\nInstall the required dependencies.\n[Install dependencies](command:spfx-toolkit.installDependencies)\n\n\n\nLearn more about SharePoint Framework and this toolkit.\n[Walkthrough](command:spfx-toolkit.welcome)\n\n\n\nFor additional help or resources visit the [extension wiki](https://github.com/pnp/vscode-viva/wiki)."
335+
"contents": "Welcome to SharePoint Framework Toolkit\n\n\nTo start create a new SharePoint Framework project. \n[Create a new project](command:spfx-toolkit.createProject)\n\n\n\n\n\nUse a sample to kick off a new project and boost your development.\n[View samples](command:spfx-toolkit.samplesGallery)\n\n\n\n\n\nYou can also open an existing app.\n[Open folder](command:vscode.openFolder)\n\n\n\n\n\nValidate your local workspace and check if you have the required dependencies.\n[Check dependencies](command:spfx-toolkit.checkDependencies)\n\n\n\n\n\nInstall the required dependencies.\n[Install dependencies](command:spfx-toolkit.installDependencies)\n\n\n\nLearn more about SharePoint Framework and this toolkit.\n[Walkthrough](command:spfx-toolkit.welcome)\n\n\n\nStart effortlessly with GitHub Copilot. Get SPFx tailored support in setting up your local workspace, creating a new project, or managing your tenant.\n[Use @SPFx in GitHib Copilot](command:spfx-toolkit.openCopilot) \n\n\n\n\n\nFor additional help or resources visit the [extension wiki](https://github.com/pnp/vscode-viva/wiki)."
336336
}
337337
],
338338
"commands": [
@@ -466,6 +466,23 @@
466466
"category": "SharePoint Framework Toolkit",
467467
"icon": "$(sync)"
468468
},
469+
{
470+
"command": "spfx-toolkit.installAppCatalogApp",
471+
"title": "Install",
472+
"category": "SharePoint Framework Toolkit",
473+
"icon": "$(package)"
474+
},
475+
{
476+
"command": "spfx-toolkit.uninstallAppCatalogApp",
477+
"title": "Uninstall",
478+
"category": "SharePoint Framework Toolkit",
479+
"icon": "$(remove)"
480+
},
481+
{
482+
"command": "spfx-toolkit.setFormCustomizer",
483+
"title": "Set Form Customizer",
484+
"category": "SharePoint Framework Toolkit"
485+
},
469486
{
470487
"command": "spfx-toolkit.showMoreActions",
471488
"title": "...",
@@ -541,6 +558,14 @@
541558
{
542559
"command": "spfx-toolkit.upgradeAppCatalogApp",
543560
"group": "actions.more@5"
561+
},
562+
{
563+
"command": "spfx-toolkit.installAppCatalogApp",
564+
"group": "actions.more@5"
565+
},
566+
{
567+
"command": "spfx-toolkit.uninstallAppCatalogApp",
568+
"group": "actions.more@5"
544569
}
545570
],
546571
"explorer/context": [
@@ -594,7 +619,7 @@
594619
"@types/react": "^18.0.8",
595620
"@types/react-dom": "^18.0.3",
596621
"@types/react-router-dom": "^5.3.3",
597-
"@types/vscode": "^1.90.0",
622+
"@types/vscode": "^1.93.0",
598623
"@typescript-eslint/eslint-plugin": "^5.9.1",
599624
"@typescript-eslint/parser": "^5.9.1",
600625
"@vscode/prompt-tsx": "^0.2.3-alpha",

src/chat/PromptHandlers.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class PromptHandlers {
2525
}
2626
}
2727

28-
// TODO: in near future we may retrieve chat history like const previousMessages = context.history.filter((h) => h instanceof vscode.ChatResponseTurn );. currently it is only insiders
2928
const messages: vscode.LanguageModelChatMessage[] = [];
3029
messages.push(vscode.LanguageModelChatMessage.Assistant(promptContext));
3130
messages.push(vscode.LanguageModelChatMessage.Assistant(PromptHandlers.getChatCommandPrompt(chatCommand)));
@@ -39,7 +38,7 @@ export class PromptHandlers {
3938

4039
messages.push(vscode.LanguageModelChatMessage.User(request.prompt));
4140
PromptHandlers.history.push(request.prompt);
42-
// TODO: in near future it will be possible to use user selected model like `await request.model.sendRequest(messages, {}, token);` now it is only available in insiders
41+
4342
const [model] = await vscode.lm.selectChatModels({ vendor: 'copilot', family: PromptHandlers.modelFamily });
4443
try {
4544
const chatResponse = await model.sendRequest(messages, {}, token);
@@ -66,8 +65,14 @@ export class PromptHandlers {
6665
}
6766
} catch (err: any) {
6867
Logger.getInstance();
69-
Logger.error(err!.error ? err!.error.message.toString() : err.toString());
68+
const errorText = err!.error ? err!.error.message.toString() : err.toString();
69+
Logger.error(errorText);
7070
stream.markdown('\n\nI was not able to retrieve the data from SharePoint. Please check the logs in output window for more information.');
71+
72+
const markdownString = new vscode.MarkdownString();
73+
markdownString.supportHtml = true;
74+
markdownString.appendMarkdown(`<span style="color:#f00;">${errorText}</span>`);
75+
stream.markdown(markdownString);
7176
}
7277
}
7378

src/constants/Commands.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ export const Commands = {
4343
// Webviews
4444
samplesGallery: `${EXTENSION_NAME}.samplesGallery`,
4545

46+
// Bundle
47+
bundleProject: `${EXTENSION_NAME}.bundleProject`,
48+
49+
// Package
50+
packageProject: `${EXTENSION_NAME}.packageProject`,
51+
4652
// Serving
4753
serveProject: `${EXTENSION_NAME}.serveProject`,
4854

@@ -53,12 +59,20 @@ export const Commands = {
5359
// Welcome
5460
welcome: `${EXTENSION_NAME}.welcome`,
5561

62+
//Copilot
63+
openCopilot: `${EXTENSION_NAME}.openCopilot`,
64+
5665
// App actions
5766
deployAppCatalogApp: `${EXTENSION_NAME}.deployAppCatalogApp`,
5867
retractAppCatalogApp: `${EXTENSION_NAME}.retractAppCatalogApp`,
5968
removeAppCatalogApp: `${EXTENSION_NAME}.removeAppCatalogApp`,
6069
enableAppCatalogApp: `${EXTENSION_NAME}.enableAppCatalogApp`,
6170
disableAppCatalogApp: `${EXTENSION_NAME}.disableAppCatalogApp`,
6271
upgradeAppCatalogApp: `${EXTENSION_NAME}.upgradeAppCatalogApp`,
63-
showMoreActions: `${EXTENSION_NAME}.showMoreActions`
72+
installAppCatalogApp: `${EXTENSION_NAME}.installAppCatalogApp`,
73+
uninstallAppCatalogApp: `${EXTENSION_NAME}.uninstallAppCatalogApp`,
74+
showMoreActions: `${EXTENSION_NAME}.showMoreActions`,
75+
76+
// Set form customizer
77+
setFormCustomizer: `${EXTENSION_NAME}.setFormCustomizer`
6478
};

src/constants/ContextKeys.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ export const ContextKeys = {
99
removeApp: 'pnp.etv.app.remove',
1010
enableApp: 'pnp.etv.app.enable',
1111
disableApp: 'pnp.etv.app.disable',
12-
upgradeApp: 'pnp.etv.app.upgrade'
12+
upgradeApp: 'pnp.etv.app.upgrade',
13+
installApp: 'pnp.etv.app.install',
14+
uninstallApp: 'pnp.etv.app.uninstall'
1315
};

src/constants/ProjectFileContent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export enum ProjectFileContent {
66
installReusableReactControls = 'install-spfx-controls-react',
77
installPnPJs = 'install-pnpjs',
88
installSPFxFastServe = 'install-spfx-fast-serve',
9+
installReact = 'install-react',
910
createNVMRCFile = 'create-nvmrc-file',
1011
createNodeVersionFile = 'create-node-version-file',
1112
}

src/extension.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { CliActions } from './services/actions/CliActions';
1212
import { PromptHandlers } from './chat/PromptHandlers';
1313
import { CHAT_PARTICIPANT_NAME, ProjectFileContent } from './constants';
1414
import { EntraAppRegistration } from './services/actions/EntraAppRegistration';
15+
import { CopilotActions } from './services/actions/CopilotActions';
1516

1617

1718
export async function activate(context: vscode.ExtensionContext) {
@@ -29,6 +30,7 @@ export async function activate(context: vscode.ExtensionContext) {
2930
Scaffolder.registerCommands();
3031
CliActions.registerCommands();
3132
EntraAppRegistration.registerCommands(context);
33+
CopilotActions.registerCommands();
3234

3335
CommandPanel.register();
3436

@@ -68,6 +70,10 @@ export async function activate(context: vscode.ExtensionContext) {
6870
await TerminalCommandExecuter.runCommand('spfx-fast-serve --force-install', terminalTitle, terminalIcon);
6971
}
7072

73+
if (fileContents.indexOf(ProjectFileContent.installReact) > -1) {
74+
await TerminalCommandExecuter.runCommand('npm install [email protected] [email protected]', terminalTitle, terminalIcon);
75+
}
76+
7177
// If either of the following strings are found in the project file, run the command to get the node version
7278
if (fileContents.indexOf(ProjectFileContent.createNVMRCFile) > -1 || fileContents.indexOf(ProjectFileContent.createNodeVersionFile) > -1) {
7379
let nodeVersionCommand = 'node --version > ';

src/models/SpfxScaffoldCommandInput.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface SpfxScaffoldCommandInput extends SpfxAddComponentCommandInput {
77
shouldRunInit: boolean;
88
shouldInstallReusablePropertyPaneControls: boolean;
99
shouldInstallReusableReactControls: boolean;
10+
shouldInstallReact: boolean;
1011
shouldInstallPnPJs: boolean;
1112
shouldInstallSPFxFastServe: boolean;
1213
shouldCreateNodeVersionFile: boolean;

src/panels/CommandPanel.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ export class CommandPanel {
212212
new ActionTreeItem('Remove', '', undefined, undefined, Commands.removeAppCatalogApp, [app.ID, app.Title], ContextKeys.removeApp),
213213
new ActionTreeItem('Enable', '', undefined, undefined, Commands.enableAppCatalogApp, [app.Title, tenantAppCatalogUrl, app.Enabled], ContextKeys.enableApp),
214214
new ActionTreeItem('Disable', '', undefined, undefined, Commands.disableAppCatalogApp, [app.Title, tenantAppCatalogUrl, app.Enabled], ContextKeys.disableApp),
215-
new ActionTreeItem('Upgrade', '', undefined, undefined, Commands.upgradeAppCatalogApp, [app.ID, app.Title, tenantAppCatalogUrl, true], ContextKeys.upgradeApp)
215+
new ActionTreeItem('Upgrade', '', undefined, undefined, Commands.upgradeAppCatalogApp, [app.ID, app.Title, tenantAppCatalogUrl, true], ContextKeys.upgradeApp),
216+
new ActionTreeItem('Install', '', undefined, undefined, Commands.installAppCatalogApp, [app.ID, app.Title], ContextKeys.installApp),
217+
new ActionTreeItem('Uninstall', '', undefined, undefined, Commands.uninstallAppCatalogApp, [app.ID, app.Title], ContextKeys.uninstallApp)
216218
]
217219
)
218220
);
@@ -252,7 +254,9 @@ export class CommandPanel {
252254
new ActionTreeItem('Remove', '', undefined, undefined, Commands.removeAppCatalogApp, [app.ID, app.Title, siteAppCatalogUrl], ContextKeys.removeApp),
253255
new ActionTreeItem('Enable', '', undefined, undefined, Commands.enableAppCatalogApp, [app.Title, siteAppCatalogUrl, app.Enabled], ContextKeys.enableApp),
254256
new ActionTreeItem('Disable', '', undefined, undefined, Commands.disableAppCatalogApp, [app.Title, siteAppCatalogUrl, app.Enabled], ContextKeys.disableApp),
255-
new ActionTreeItem('Upgrade', '', undefined, undefined, Commands.upgradeAppCatalogApp, [app.ID, app.Title, siteAppCatalogUrl, false], ContextKeys.upgradeApp)
257+
new ActionTreeItem('Upgrade', '', undefined, undefined, Commands.upgradeAppCatalogApp, [app.ID, app.Title, siteAppCatalogUrl, false], ContextKeys.upgradeApp),
258+
new ActionTreeItem('Install', '', undefined, undefined, Commands.installAppCatalogApp, [app.ID, app.Title, siteAppCatalogUrl], ContextKeys.installApp),
259+
new ActionTreeItem('Uninstall', '', undefined, undefined, Commands.uninstallAppCatalogApp, [app.ID, app.Title, siteAppCatalogUrl], ContextKeys.uninstallApp)
256260
]
257261
)
258262
);
@@ -281,12 +285,10 @@ export class CommandPanel {
281285
private static taskTreeView() {
282286
const taskCommands: ActionTreeItem[] = [
283287
new ActionTreeItem('Build project', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp build'),
284-
new ActionTreeItem('Bundle project (local)', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp bundle'),
285-
new ActionTreeItem('Bundle project (production)', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp bundle --ship'),
288+
new ActionTreeItem('Bundle project', '', { name: 'debug-start', custom: false }, undefined, Commands.bundleProject),
286289
new ActionTreeItem('Clean project', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp clean'),
287290
new ActionTreeItem('Deploy project assets to Azure Storage', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp deploy-azure-storage'),
288-
new ActionTreeItem('Package (local)', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp package-solution'),
289-
new ActionTreeItem('Package (production)', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp package-solution --ship'),
291+
new ActionTreeItem('Package', '', { name: 'debug-start', custom: false }, undefined, Commands.packageProject),
290292
new ActionTreeItem('Serve', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp serve'),
291293
new ActionTreeItem('Serve (nobrowser)', '', { name: 'debug-start', custom: false }, undefined, Commands.executeTerminalCommand, 'gulp serve --nobrowser'),
292294
new ActionTreeItem('Serve from configuration', '', { name: 'debug-start', custom: false }, undefined, Commands.serveProject),
@@ -310,6 +312,7 @@ export class CommandPanel {
310312

311313
actionCommands.push(new ActionTreeItem('Add new component', '', { name: 'add', custom: false }, undefined, Commands.addToProject));
312314
actionCommands.push(new ActionTreeItem('Scaffold CI/CD Workflow', '', { name: 'rocket', custom: false }, undefined, Commands.pipeline));
315+
actionCommands.push(new ActionTreeItem('Set Form Customizer', '', { name: 'checklist', custom: false }, undefined, Commands.setFormCustomizer));
313316
actionCommands.push(new ActionTreeItem('View samples', '', { name: 'library', custom: false }, undefined, Commands.samplesGallery));
314317

315318
window.registerTreeDataProvider('pnp-view-actions', new ActionTreeDataProvider(actionCommands));

0 commit comments

Comments
 (0)