Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 57.2 KB

breaking-changes.md

File metadata and controls

34 lines (23 loc) · 57.2 KB

Breaking Changes since 2/27/2019

  • Additional Q&A about breaking changes can be found here
  • To ask a question about breaking changes use this

5.0.302.21401

4603492Force dependency injected view models

Expected Errors 
- `Cannot find module '. /ViewModelFactories'`

Solution
You will need to migrate your extension to use dependency injected view models. Instructions can be found here: https://github.com/Azure/portaldocs/blob/dev/portal-sdk/templates/top-extensions-performance.md#dependency-injected-view-models

Reason for Breaking Change
Migrating to dependency injected view models offers a 15% performance improvement to extension load. The majority of extension partners are already using dependency injected view models.

4601757Fix Ev2Generator misspelling for ExtensionPageVersion


Expected Errors:

- ExtenensionPageVersion does not exist (Only applies if running ev2generator.exe or the GenerateEv2ContentTask directly). Side effect may be a build output with file named ".zip" i.e no version present.

Solution:

-  Update argument to ev2generator.exe and/or GenerateEv2ContentTask from `ExtenensionPageVersion` to `ExtensionPageVersion`

Reason For Breaking Change

- argument name spelled incorrectly

4582614Delete MonitorChart v1 control implementation

**Expected errors:**
- The v1 MonitorChart control is being deprecated in favor of the MonitorChartV2 control. Existing references to the MonitorChart v1 control will be redirected to the v2 control. You may see visual differences or possibly errors.
**Solution:**
- Please update your code to use the MonitorChartV2 control.
**Reason For Breaking Change**
-The new MonitorChartV2 control has replaced the original MonitorChart control and exceeds the capabilities of the original MonitorChart control in every way, while adding new capabilities like filtering, splitting, more chart types, etc
-For performance and maintainability reasons we are removing the legacy chart.

5.0.302.20601

4601757Fix Ev2Generator misspelling for ExtensionPageVersion


Expected Errors:

- ExtenensionPageVersion does not exist (Only applies if running ev2generator.exe or the GenerateEv2ContentTask directly). Side effect may be a build output with file named ".zip" i.e no version present.

Solution:

-  Update argument to ev2generator.exe and/or GenerateEv2ContentTask from `ExtenensionPageVersion` to `ExtensionPageVersion`

Reason For Breaking Change

- argument name spelled incorrectly

5.0.302.20501

4604666Reduce ExtensionDefinition codegen

Expected Errors 
- `error TS2339: Build:Property 'definitionName' does not exist on type 'typeof ExtensionDefinition'.`

Solution
The contents of ExtensionDefinition.ts is now generated using mostly const enums. You will have to migrate your code. Refer to the changes in HubsExtension and SamplesExtension in this PR for an example: https://msazure.visualstudio.com/One/_git/AzureUX-PortalFx/pullrequest/1669469?_a=overview

Reason for Breaking Change
The previous codegen for ExtensionDefinition.ts results in runtime code and negatively impacts blade loads.

4603492Force dependency injected view models

Expected Errors 
- `Cannot find module '. /ViewModelFactories'`

Solution
You will need to migrate your extension to use dependency injected view models. Instructions can be found here: https://github.com/Azure/portaldocs/blob/dev/portal-sdk/templates/top-extensions-performance.md#dependency-injected-view-models

Reason for Breaking Change
Migrating to dependency injected view models offers a 15% performance improvement to extension load. The majority of extension partners are already using dependency injected view models.

5.0.302.20401

4566879Deprecate NuGet publish of Microsoft.Portal.Framework.Scripts


Expected Errors:
- NuGet restore and install fail for Microsoft.Portal.Framework.Scripts
- msportalfx.js not found

Solution:
Microsoft.Portal.Framework.Scripts NuGet and msportalfx.js has been replaced by the msportalfx-ut node_module.  Migrate to msportalfx-ut. The msportalfx-ut node module is available within the internal npm registry https://msazure.visualstudio.com/One/_packaging?_a=feed&feed=AzurePortalNpmRegistry and also within the Microsoft.Portal.TestFramework.UnitTest NuGet package.  documentation for msportalf-ut is available at https://aka.ms/portalfx/msportalfx-ut
 
Reason For Breaking Change:
- ContentUnbundler which generates msportalfx.js has been deprecated.
- msportalfx-ut has been available for over a year.

4566822Deprecate NuGet publish of Microsoft.Portal.Tools.ContentUnbundler


Expected Errors:
- NuGet restore and install fail for Microsoft.Portal.Tools.ContentUnbundler.
- Microsoft.Portal.Tools.ContentUnbundler.targets not found

Solution:
Move to the new hosting service zip format generated by Microsoft.Portal.Tools.V2.targets.  Migration instructions are at https://aka.ms/portalfx/removecuvideo.

Reason For Breaking Change:
ContentUnbundler has been superseded with the new v2 build and v2 hosting service ingestion pipeline.

4477578Remove obsoleted APIs/Code which is over the SLA

Obsolete modules have been removed:
Fx/Base/Base.Net.Batch
Fx/Controls/HatchingPattern

In multiple controls the 'readonly' property was renamed to 'readOnly'. Now the obsoleted 'readonly' property is being removed fully.

4416438Deprecate and obsolete the HubsExtension.Azure.Subscriptions class


Expected Errors:

- Calling MsPortalFx.Azure.getSelectedSubscriptions() may return the following error:

error TS2322: Build:Type 'Promise<ReadonlyArray<Subscription>>' is not assignable t
o type 'Promise<Subscription[]>'.


Solution:

- If you receive this error, update your return type to accept a Promise<ReadonlyArray<Subscription>>.

Reason For Breaking Change

- The return type for MsPortalFx.Azure.getSelectedSubscriptions() API has been updated to return a Promise<ReadonlyArray<Subscription>> instead of Promise<Subscription[]>.

3835731Use actual timezone IDs instead of numbers in the enum values.

The TimeZoneId enum is changing from having integer values to string values. These string values correspond to the ID values available via the .NET APIs for timezones. There should ideally be no action required by the extensions unless they are storing these ID values on the server somewhere. In those cases you will need to update the stored values from numbers to their corresponding string IDs.

5.0.302.18801

4385005Fix Controls APIs to move from create overrides to createXXX model

In Essentials Control:
Replaced the overriden 'create' method for the various Essentials control variants to separate and easily identifiable create methods - createDefaultResourceLayout, createCustomResourceLayout & createNonResourceLayout.

To address compilation errors, update the code as follows:
create(ltm, options: DefaultResourceLayout) => createDefaultResourceLayout(ltm, options: DefaultResourceLayout)
create(ltm, options: CustomResourceLayout) => createCustomResourceLayout(ltm, options: CustomResourceLayout)
create(ltm, options: NonResourceLayout) => createNonResourceLayout(ltm, options: NonResourceLayout)


In FileUpload Control:
Replaced the overriden 'create' method for the various FileUpload control variants to separate and easily identifiable create methods - createFullUpload, createStreamUpload & createBlobStoreUpload.
Also introduced FullUploadOptions/FullUploadContract, StreamUploadOptions/StreamUploadContract for the respective create method variants.

To address compilation errors, update the code as follows:
create(ltm, options: Options) => createFullUpload(ltm, options: FullUploadOptions
                                                     OR 
                                                     createStreamUpload(ltm, options: StreamUploadOptions)
create(ltm, options: BlobUploadOptions) => createBlobStoreUpload(ltm, options: BlobUploadOptions)


In RangeSlider Control
Replaced the overriden 'create' method for the various RangeSlider control variants to separate and easily identifiable create methods - createSimpleRangeSlider & createCustomRangeSlider.
Also renamed CustomValueOptions/CustomValueContract to CustomRangeSliderOptions/CustomRangeSliderContract, and introduced SimpleRangeSliderOptions/SimpleRangeSliderContract.

To address compilation errors, update the code as follows:
create(ltm, options: Options) => createSimpleRangeSlider(ltm, options: SimpleRangeSliderOptions)
create(ltm, options: CustomValueOptions) => createCustomRangeSlider(ltm, options: CustomRangeSliderOptions)


In Slider Control
Replaced the overriden 'create' method for the various Slider control variants to separate and easily identifiable create methods - createSimpleSlider & createCustomSlider.
Also renamed CustomValueOptions/CustomValueContract to CustomSliderOptions/CustomSliderContract, and introduced SimpleSliderOptions/SimpleSliderContract.

To address compilation errors, update the code as follows:
create(ltm, options: Options) => createSimpleSlider(ltm, options: SimpleSliderOptions)
create(ltm, options: CustomValueOptions) => createCustomSlider(ltm, options: CustomSliderOptions)

5.0.302.17401

4209933[ibiza][Tile Gallery]remove `ThumbnailStretch` of PartGalleryInfoDefinition from the whole framework


**TypeScript Error**
PartGalleryInfoDefinition may throw error `Type '{ "title": string; "description": string; "category": string; "thumbnail": Image; "thumbnailStretch": 0; }' is not assignable to type 'PartGalleryInfoDefinition'`. or `'thumbnailStretch' does not exist in type 'PartGalleryInfoDefinition'`.

**PDL Error**
`Cannot set unknown member 'Microsoft.Portal.Pdc.Schema.PartGalleryInfo.ThumbnailStretch'`

**Solution:**
Just remove the `thumbnailStretch` property from `PartGalleryInfoDefinition`.

**Reason for Breaking Change:**
`ThumbnailStretch` property is no longer used in the Tile Gallery feature. 

4198773[ibiza][Tile Gallery] Breaking Change: remove `pivotKind` of PartGalleryInfoDefinition from the whole framework


**Expected Error:**
PartGalleryInfoDefinition may throw error `Type '{ "title": string; "description": string; "category": string; "thumbnail": Image; "thumbnailStretch": 0; "pivotKind": number; }' is not assignable to type 'PartGalleryInfoDefinition'`. or `'pivotKind' does not exist in type 'PartGalleryInfoDefinition'`.

**Solution:**
Just directly remove the `pivotKind` property from `PartGalleryInfoDefinition`.

**Reason for Breaking Change:**
`pivotKind` property is not used in the new Tile Gallery any more. It's unnecessary still keeping it in the `PartGalleryInfoDefinition`.

4186923[ibiza][Tile Gallery]remote unnecessary interface and class from old tile gallery

No description available for this breaking change.

3917489Change EditableGrid to use AMD Toolbar control

EditableGrid has been updated to use the AMD toolbar control "Fx/Controls/Toolbar".
This may cause compilation errors.
To resolve the errors change usages from MsPortalFx.ViewModels.Toolbar to the AMD toolbar control and toolbar buttons.
When updating a command button the replacements for 'canExecute' and 'execute' are 'disabled' and 'onClick' respectively.

3870343Grid2 allow specifying row height

The ability to set the row height for all grid rows was added.
The current defineRow callback was not sufficient for this setting since it applies to all rows.
A new row options setting was added to replace defineRow.

defineRow: (_rowLifetime, item) => {
    return {
        ariaLabel: item.title,
        disabled: item.isDisabled,
    };
}

row: {
    height: 32,
    ariaLabel: (_rowLifetime, item) => item.title,
    disabled: (_rowLifetime, item) => item.isDisabled,
}

3811511Remove jQuery promises


Expected Errors:

N/A

Solution:
In MsPortalFx.ViewModels.Controls.Visualization.Graph.Contract 

Old API: 
addEdge(edgeToAdd: IGraphEdgeForAddition): JQueryPromise;
deleteEntities(nodesToDelete: IGraphNodeForDeletion[], edgesToDelete: IGraphEdgeForDeletion[]): JQueryPromise;

New API:
addEdge(edgeToAdd: IGraphEdgeForAddition): Q.Promise;
deleteEntities(nodesToDelete: IGraphNodeForDeletion[], edgesToDelete: IGraphEdgeForDeletion[]): Q.Promise;

Reason For Breaking Change
- Cleaning up JQueryPromise usage and migrate to native promise/Q promise for performance and code maintenance.

3800421Fix errors in video control due to multiple instances

'canAutoplay' property is not available on the 'Options' interface of the Video control anymore. This property had no affect on the widget and the extension simply needed to set/unset the 'autoplay' property. The 'canAutoPlay' property is still available on the 'Contract' interface of the Video control to track whether the current instance of the control supports autoplay or not based on the video URL that is provided.

3657227Fix ComponentGovernance warnings for msportalfx-ut update all deps incl gulp/karma.

3331130Obsolete MsPortalFx.ViewModels.Forms.TriStateCheckBox ​


Expected Errors:

The MsPortalFx.ViewModels.Forms.TriStateCheckBox.ViewModel class has been deprecated and will be removed from the runtime once all extensions have stopped referencing it.

Solution:

Replace references to this class to references to the new AMD module
ie:
```
const myCheckBox = new MsPortalFx.ViewModels.Forms.TriStateCheckBox.ViewModel(lifetime, options)
```
becomes
```
import * as TriStateCheckbox from "Fx/Controls/TriStateCheckBox";
...
const myCheckBox = TriStateCheckbox.create(lifetime, options);
```
Reason For Breaking Change

MsPortalFx viewmodels are loaded at startup for every extension regardless of if they are used.  By moving to AMD versions of viewmodels, less code is downloaded to the client and startup performance increases.

3331128Obsolete MsPortalFx.ViewModels.Forms.TokenComboBox ​


Expected Errors:

The MsPortalFx.ViewModels.Forms.TriStateCheckBox.ViewModel class has been deprecated and will be removed from the runtime once all extensions have stopped referencing it.

Solution:

Replace references to this class to references to the new AMD module
ie:
```
const myTokenComboBox= new MsPortalFx.ViewModels.Forms.TokenComboBox.ViewModel(lifetime, options)
```
becomes
```
import * as PillCollection from "Fx/Controls/PillCollection";
...
const myTokenComboBox = PillCollection.create(lifetime, options);
```
Reason For Breaking Change

MsPortalFx viewmodels are loaded at startup for every extension regardless of if they are used.  By moving to AMD versions of viewmodels, less code is downloaded to the client and startup performance increases.

Also, the token combo box has 0 usage and is not accessible, so removing it seems like an all around win.

5.0.302.15601

3811511Remove jQuery promises


Expected Errors:

N/A

Solution:
In MsPortalFx.ViewModels.Controls.Visualization.Graph.Contract 

Old API: 
addEdge(edgeToAdd: IGraphEdgeForAddition): JQueryPromise;
deleteEntities(nodesToDelete: IGraphNodeForDeletion[], edgesToDelete: IGraphEdgeForDeletion[]): JQueryPromise;

New API:
addEdge(edgeToAdd: IGraphEdgeForAddition): Q.Promise;
deleteEntities(nodesToDelete: IGraphNodeForDeletion[], edgesToDelete: IGraphEdgeForDeletion[]): Q.Promise;

Reason For Breaking Change
- Cleaning up JQueryPromise usage and migrate to native promise/Q promise for performance and code maintenance.

5.0.302.15301

3800421Fix errors in video control due to multiple instances

'canAutoplay' property is not available on the 'Options' interface of the Video control anymore. This property had no affect on the widget and the extension simply needed to set/unset the 'autoplay' property. The 'canAutoPlay' property is still available on the 'Contract' interface of the Video control to track whether the current instance of the control supports autoplay or not based on the video URL that is provided.

3657227Fix ComponentGovernance warnings for msportalfx-ut update all deps incl gulp/karma.

5.0.302.14701

3781217Deprecate embedded content support in SDK

No description available for this breaking change.

5.0.302.14601

3800421Fix errors in video control due to multiple instances

'canAutoplay' property is not available on the 'Options' interface of the Video control anymore. This property had no affect on the widget and the extension simply needed to set/unset the 'autoplay' property. The 'canAutoPlay' property is still available on the 'Contract' interface of the Video control to track whether the current instance of the control supports autoplay or not based on the video URL that is provided.