Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit e730612

Browse files
committed
Fixed an issue where the themes menu was empty on Windows & Linux
1 parent b024544 commit e730612

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
## Fixed
1414
- [client] Hid services pane by default in PR [2059](https://github.com/microsoft/BotFramework-Emulator/pull/2059)
1515
- [client] Fixed an issue where trying to add a QnA KB manually after signing into Azure was causing the app to crash in PR [2066](https://github.com/microsoft/BotFramework-Emulator/pull/2066)
16+
- [client] Removed buble background on attachments [2067](https://github.com/microsoft/BotFramework-Emulator/pull/2067)
17+
- [client] Fixed an issue where the themes menu was empty on Windows & Linux in PR [2069](https://github.com/microsoft/BotFramework-Emulator/pull/2069)
1618

1719
## Removed
1820
- [client/main] Removed legacy payments code in PR [2058](https://github.com/microsoft/BotFramework-Emulator/pull/2058)
1921

20-
## Fixed
21-
- [client] Removed buble background on attachments [2067](https://github.com/microsoft/BotFramework-Emulator/pull/2067)
22-
2322
## v4.7.0 - 2019 - 12 - 13
2423
## Fixed
2524
- [client] Added an empty state for the recent bots submenu in the app menu for Windows in PR [1945](https://github.com/microsoft/BotFramework-Emulator/pull/1945)

packages/app/client/src/ui/shell/appMenu/appMenu.spec.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,25 @@ describe('<AppMenu />', () => {
106106
...instance.props,
107107
activeBot: undefined,
108108
activeDocumentType: SharedConstants.ContentTypes.CONTENT_TYPE_WELCOME_PAGE,
109+
availableThemes: [
110+
{ name: 'Light', href: '' },
111+
{ name: 'Dark', href: '' },
112+
{ name: 'High contrast', href: '' },
113+
],
114+
currentTheme: 'Light',
115+
recentBots: [
116+
{ displayName: 'bot1', path: 'path1' },
117+
{ displayName: 'bot2', path: 'path2' },
118+
{ displayName: 'bot3', path: 'path3' },
119+
{ displayName: 'bot4', path: 'path4' },
120+
],
109121
};
110122
const menuTemplate = (instance as any).updateMenu(AppMenuTemplate.template);
111123

112124
expect(Object.keys(menuTemplate)).toHaveLength(6);
125+
expect(menuTemplate['file'][3].items.length).toBe(4); // recent bots menu should be populated
113126
expect(menuTemplate['file'][7].disabled).toBe(true); // "Close tab" should be disabled
127+
expect(menuTemplate['file'][14].items.length).toBe(3); // themes menu should be populated
114128
expect(menuTemplate['conversation'][0].disabled).toBe(true); // send activity menu should be disabled on welcome page
115129
});
116130

packages/app/client/src/ui/shell/appMenu/appMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class AppMenu extends React.Component<AppMenuProps, {}> {
8686

8787
private updateMenu(template: { [key: string]: MenuItem[] }): { [key: string]: MenuItem[] } {
8888
const fileMenu = template['file'];
89-
fileMenu[12].items = this.getThemeMenuItems();
89+
fileMenu[14].items = this.getThemeMenuItems();
9090
fileMenu[3].items = this.getRecentBotsMenuItems();
9191
// disable / enable "Close tab" button
9292
fileMenu[7].disabled = !this.props.activeBot;

0 commit comments

Comments
 (0)