|
| 1 | +--- |
| 2 | +title: SharePoint Framework v1.15.2 release notes |
| 3 | +description: Release notes for the SharePoint Framework v1.15.2 release |
| 4 | +ms.date: 08/02/2022 |
| 5 | +ms.localizationpriority: high |
| 6 | +--- |
| 7 | +# SharePoint Framework v1.15.2 release notes |
| 8 | + |
| 9 | +This release introduces updates across the features around Microsoft Viva, Microsoft Teams and SharePoint. |
| 10 | + |
| 11 | +**Released:** August 2, 2022 |
| 12 | + |
| 13 | +[!INCLUDE [spfx-release-notes-common](../../includes/snippets/spfx-release-notes-common.md)] |
| 14 | + |
| 15 | +## Install the latest released version |
| 16 | + |
| 17 | +Install the latest release of the SharePoint Framework (SPFx) by including the **@latest** tag: |
| 18 | + |
| 19 | +```console |
| 20 | +npm install @microsoft/generator-sharepoint@latest --global |
| 21 | +``` |
| 22 | + |
| 23 | +## Upgrading projects from v1.15.0 to v1.15.2 |
| 24 | + |
| 25 | +1. In the project's **package.json** file, identify all SPFx v1.15.0 packages. For each SPFx package: |
| 26 | + 1. Uninstall the existing v1.14 package: |
| 27 | + |
| 28 | + ```console |
| 29 | + npm uninstall @microsoft/{spfx-package-name}@1.15.0 |
| 30 | + ``` |
| 31 | + |
| 32 | + 2. Install the new v1.15.2 package: |
| 33 | + |
| 34 | + ```console |
| 35 | + npm install @microsoft/{spfx-package-name}@latest --save --save-exact |
| 36 | + ``` |
| 37 | + |
| 38 | +[!INCLUDE [spfx-release-upgrade-tip](../../includes/snippets/spfx-release-upgrade-tip.md)] |
| 39 | + |
| 40 | +## New features and capabilities |
| 41 | + |
| 42 | +### Enable Service Principal Registration at Permission Scope Approval Time |
| 43 | +When an SPFx solution requires access to APIs we allow administrators to pre-approve those permission scopes for the whole tenant in the "API Access" page in Tenant Admin. |
| 44 | + |
| 45 | +However, previously we assumed and required that API to be already present in the tenant (either via an app principal or Service Principal in case of multi-tenant APIs) and, if that's not the case, we generated an error during the permissions scope approval. |
| 46 | + |
| 47 | +Now developers are able to specify **optional** attributes `appId` and `replyUrl` in `webApiPermissionRequests` section of `package-solution.json`. |
| 48 | + |
| 49 | +### New Action types for media - General Availability. |
| 50 | + |
| 51 | +```typescript |
| 52 | +ISPFxAdaptiveCard.actions?: ( |
| 53 | + | ISubmitAction |
| 54 | + | IOpenUrlAction |
| 55 | + | IShowCardAction |
| 56 | + | IGetLocationAction |
| 57 | + | IShowLocationAction |
| 58 | + | ISelectMediaAction // Raise a file picker or native media picker |
| 59 | +)[]; |
| 60 | +``` |
| 61 | + |
| 62 | +The ___location actions can be configured as shown below: |
| 63 | +```typescript |
| 64 | + actions: [ |
| 65 | + { |
| 66 | + type: 'VivaAction.GetLocation', |
| 67 | + id: 'Get Location', |
| 68 | + parameters: {chooseLocationOnMap: true} |
| 69 | + } |
| 70 | + { |
| 71 | + type: 'VivaAction.ShowLocation', |
| 72 | + id: 'Show Location', |
| 73 | + parameters: parameters: {locationCoordinates: {latitude: 40, longitude: 40}} |
| 74 | + } |
| 75 | + ] |
| 76 | +``` |
| 77 | + |
| 78 | +The SelectMedia action can be configured as shown below: |
| 79 | +```typescript |
| 80 | + actions: [ |
| 81 | + { |
| 82 | + type: 'VivaAction.SelectMedia', |
| 83 | + id: 'Select File', |
| 84 | + parameters: {mediaType: MediaType.Image, allowMultipleCapture: true, maxSizePerFile : 200000, supportedFileFormats: ['jpg']}, |
| 85 | + title: 'Select File' |
| 86 | + } |
| 87 | + ] |
| 88 | +``` |
| 89 | + |
| 90 | +The action will be rendered as below: |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +The Select Media Action can be used to select Images from your native device. In the browser it uses the file picker to help access relavant files: |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +### Updates to ESLint rules |
| 101 | +Based on received feedback, we "relaxed" applied ESLint rules to removed forced opinionated coding styles practices. |
| 102 | +Also, all the rules are added directly to the `eslintrc.js` file for simpler further modifications. |
| 103 | + |
| 104 | +### Defer loading AdaptiveCardExtension Quick View |
| 105 | +When an ACE is loaded on a page we load both the card view and quick view. However, we don't need load the quick view until it is interacted with. |
| 106 | +By defer loading a quick view, we will gain performance when loading an ACE. |
| 107 | + |
| 108 | +Below is an example to defer load quick view. |
| 109 | + |
| 110 | +Remove importing quick view files in your class that extends `BaseAdaptiveCardExtension`. |
| 111 | + |
| 112 | +```typescript |
| 113 | +this.quickViewNavigator.register( |
| 114 | + QuickViewID, |
| 115 | + () => import( |
| 116 | + './Path-To-Your-QuickView-File' |
| 117 | + ).then((component) => new component.QuickView()) |
| 118 | +); |
| 119 | +``` |
| 120 | +`this.quickViewNavigator.register` callback argument now allows to return a `Promise<TView>` or `TView` directly: `() => TView | Promise<TView>` |
| 121 | + |
| 122 | +## Fixed Issues |
| 123 | + |
| 124 | +### June-July Timeframe |
| 125 | + |
| 126 | +- [#7947](https://github.com/SharePoint/sp-dev-docs/issues/7947) - Extensions are loaded on the page even if the app has been deleted from the tenant |
| 127 | +- [#8191](https://github.com/SharePoint/sp-dev-docs/issues/8191) - SPFX Teams app blank screen when you open it for second time |
| 128 | +- [#8279](https://github.com/SharePoint/sp-dev-docs/issues/8279) - New icons in production environments |
| 129 | +- [#8301](https://github.com/SharePoint/sp-dev-docs/issues/8301) - Error When Revisiting Custom Teams ?app=portals App |
| 130 | +- [#8199](https://github.com/SharePoint/sp-dev-docs/issues/8199) - `dataVersion` defined in manifest is not respected when adding a WebPart in a page |
| 131 | +- [#8272](https://github.com/SharePoint/sp-dev-docs/issues/8272) - SPFx 1.15 - Getting error when use form customiser to view existing list item in Classic mode |
| 132 | +- [#8266](https://github.com/SharePoint/sp-dev-docs/issues/8266) - SPFx 1.15 - Form Customiser does not work in View History |
| 133 | +- [#8251](https://github.com/SharePoint/sp-dev-docs/issues/8251) - `onDispose` not getting called and webparts persisting between single app pages |
| 134 | +- [#5438](https://github.com/SharePoint/sp-dev-docs/issues/5438) - Applying Field Customizer Leads to Empty Cells in Teams Files Tab |
| 135 | +- [#8263](https://github.com/SharePoint/sp-dev-docs/issues/8263) - SPFx v1.15 - gulp clean doesn't remove the 'releases' folder |
| 136 | +- [#8260](https://github.com/SharePoint/sp-dev-docs/issues/8260) - SPFx v1.15 - Please suppress unnecessary ESLint no-async-await rule |
| 137 | +- [#8268](https://github.com/SharePoint/sp-dev-docs/issues/8268) - 1.15 asset files not found in subdirectories |
| 138 | +- [#8236](https://github.com/SharePoint/sp-dev-docs/issues/8236) - SPFx 1.15 - ESLint - version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree |
| 139 | +- [#7999](https://github.com/SharePoint/sp-dev-docs/issues/7999) - Vulnerability alerts introduced by node-fetch package |
| 140 | +- [#8314](https://github.com/SharePoint/sp-dev-docs/issues/8314) - SPFx v1.15 Form customizer React template contains incorrect reference |
| 141 | +- [#8309](https://github.com/SharePoint/sp-dev-docs/issues/8309) - Update serve.json's schema to include `serveConfigurations` for IntelliSense |
0 commit comments