Skip to content

Commit

Permalink
perf: improve performance of switching schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 committed Feb 16, 2024
1 parent 62f293e commit 04da8a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions how-to/workspace-platform-starter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- FDC3 2.0 Open improvement - You can now specify instance id if you wish to open an existing instance of an app and optionally pass it context.
- Add option to allow specific modules to get unrestricted notificationClients if they want to implement custom platform logic without importing notifications directly via the npm package. The notification client options in the notification provider now has a 'restricted' setting which can be set to false.
- Update Save Page As and Duplicate Page logic using the copyPage platform override introduced in 16.1. When a page is duplicated we generated a copy of the page but generate the instance id associated with a view's name while retaining the app Id (previously you would get a new randomly generated name for the app). If your app is a singleton then the name remains unique. So you will have two pages referencing the same instance. When you switch between them it will be displaying the same instance. However, please note if you move a page to a new window then the single instance view will move with it and leave the other page's layout (a single instance can only exist on one window if you need multiple instances then instanceMode should not be set to single). Duplicate view (view context menu) currently generates a new unlinked id for a view so if you do not want this behavior you can remove Duplicate View from the View Context Menu. Feedback on this behavior is of interest.
- Improved performance of switching schemes

## v16.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,7 @@ export function overrideCallback(
*/
public async setSelectedScheme(schemeType: ColorSchemeOptionType): Promise<void> {
// The color scheme has been updated, so update the theme
await setCurrentColorSchemeMode(schemeType);

return super.setSelectedScheme(schemeType);
await Promise.all([setCurrentColorSchemeMode(schemeType), super.setSelectedScheme(schemeType)]);
}

/**
Expand Down

0 comments on commit 04da8a4

Please sign in to comment.