Skip to content

Commit

Permalink
Merge branch 'master' into fix/json-web-view-forward-navigation-scree…
Browse files Browse the repository at this point in the history
…n-reader
  • Loading branch information
denscollo committed Oct 10, 2019
2 parents c3728fd + a66f568 commit 00172c5
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 81 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -67,10 +67,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1916](https://github.com/microsoft/BotFramework-Emulator/pull/1916)
- [1917](https://github.com/microsoft/BotFramework-Emulator/pull/1917)
- [1918](https://github.com/microsoft/BotFramework-Emulator/pull/1918)
- [1921](https://github.com/microsoft/BotFramework-Emulator/pull/1921)

- [client] Fixed an issue with the transcripts path input inside of the resource settings dialog in PR [1836](https://github.com/microsoft/BotFramework-Emulator/pull/1836)
- [client] Implemented HTML app menu for Windows in PR [1893](https://github.com/microsoft/BotFramework-Emulator/pull/1893)
- [client/main] Migrated from Bing Speech API to Cognitive Services Speech API in PR [1878](https://github.com/microsoft/BotFramework-Emulator/pull/1878)
- [client] Fixed issue with certain native browser functions (cut, copy, paste, etc.) firing twice in PR [1920](https://github.com/microsoft/BotFramework-Emulator/pull/1920)
- [client] Applied theming to InsetShadow component in PR [1922](https://github.com/microsoft/BotFramework-Emulator/pull/1922)


## v4.5.2 - 2019 - 07 - 17
Expand Down
Expand Up @@ -187,11 +187,12 @@ export class BotCreationDialog extends React.Component<BotCreationDialogProps, B
</Row>
<Row align={RowAlignment.Bottom} justify={RowJustification.Left}>
<TextField
aria-label="Bot encryption key"
inputContainerClassName={dialogStyles.key}
inputRef={this.setSecretInputRef}
label="Secret "
value={secret}
placeholder="Your keys are not encrypted"
placeholder={encryptKey ? '' : 'Your keys are not encrypted'}
disabled={true}
id="key-input"
type={revealSecret ? 'text' : 'password'}
Expand All @@ -208,7 +209,12 @@ export class BotCreationDialog extends React.Component<BotCreationDialogProps, B
</LinkButton>
</li>
<li>
<LinkButton className={dialogStyles.dialogLink} disabled={!encryptKey} onClick={this.onCopyClick}>
<LinkButton
ariaLabel="Copy secret"
className={dialogStyles.dialogLink}
disabled={!encryptKey}
onClick={this.onCopyClick}
>
Copy
</LinkButton>
</li>
Expand Down
3 changes: 2 additions & 1 deletion packages/app/client/src/ui/dialogs/dialogStyles.scss
Expand Up @@ -42,9 +42,10 @@
}

.actions-list {
display: flex;
list-style: none;
padding: 0;
margin: 0 0 15px 0;
margin: 0 0 10px 0;

li {
display: inline;
Expand Down
1 change: 1 addition & 0 deletions packages/app/client/src/ui/styles/themes/dark.css
Expand Up @@ -3,6 +3,7 @@ html {
--global-focus-outline-width: 1px;
--global-focus-outline-style: solid;
--global-focus-outline-color: #75BEFF;
--box-shadow-color: var(--neutral-13);

/* Highlight colors */
--list-item-color: var(--neutral-3);
Expand Down
1 change: 1 addition & 0 deletions packages/app/client/src/ui/styles/themes/high-contrast.css
Expand Up @@ -3,6 +3,7 @@ html {
--global-focus-outline-width: 1px;
--global-focus-outline-style: solid;
--global-focus-outline-color: #F38518;
--box-shadow-color: #72C3DF;

/* Highlight colors */
--list-item-color: var(--neutral-1);
Expand Down
1 change: 1 addition & 0 deletions packages/app/client/src/ui/styles/themes/light.css
Expand Up @@ -3,6 +3,7 @@ html {
--global-focus-outline-width: 1px;
--global-focus-outline-style: solid;
--global-focus-outline-color: #1177BB;
--box-shadow-color: var(--neutral-6);

/* Highlight colors */
--list-item-color: var(--neutral-9);
Expand Down
8 changes: 4 additions & 4 deletions packages/app/client/src/ui/styles/themes/redline.css
@@ -1,9 +1,9 @@
html {
--blur-radius: 6px;
--spread-radius: -3px;
--box-shadow-top: inset 0 3px var(--blur-radius) var(--spread-radius) var(--neutral-6);
--box-shadow-left: inset 3px 0 var(--blur-radius) var(--spread-radius) var(--neutral-6);
--box-shadow-bottom: inset 0 -3px var(--blur-radius) var(--spread-radius) var(--neutral-6);
--box-shadow-right: inset -3px 0px var(--blur-radius) var(--spread-radius) var(--neutral-6);
--box-shadow-top: inset 0 3px var(--blur-radius) var(--spread-radius) var(--box-shadow-color);
--box-shadow-left: inset 3px 0 var(--blur-radius) var(--spread-radius) var(--box-shadow-color);
--box-shadow-bottom: inset 0 -3px var(--blur-radius) var(--spread-radius) var(--box-shadow-color);
--box-shadow-right: inset -3px 0px var(--blur-radius) var(--spread-radius) var(--box-shadow-color);
--border-window-clip-path: polygon(0 0, 0% 100%, 3px 100%, 3px 3px, calc(100% - 3px) 3px, calc(100% - 3px) calc(100% - 3px), 3px calc(100% - 3px), 0px 100%, 100% 100%, 100% 0%);
}
40 changes: 0 additions & 40 deletions packages/app/client/src/utils/eventHandlers.spec.ts
Expand Up @@ -47,11 +47,6 @@ const {
let mockLocalCommandsCalled = [];
let mockRemoteCommandsCalled = [];
const mockCurrentWebContents = {
undo: jest.fn(),
redo: jest.fn(),
cut: jest.fn(),
copy: jest.fn(),
paste: jest.fn(),
setZoomLevel: jest.fn(),
getZoomFactor: jest.fn(),
setZoomFactor: jest.fn(),
Expand Down Expand Up @@ -165,41 +160,6 @@ describe('#globalHandlers', () => {
});
});

it('should perform an undo when Ctrl+Z is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: 'z' });
await globalHandlers(event);

expect(mockCurrentWebContents.undo).toHaveBeenCalled();
});

it('should perform a redo when Ctrl+Y is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: 'y' });
await globalHandlers(event);

expect(mockCurrentWebContents.redo).toHaveBeenCalled();
});

it('should perform a cut when Ctrl+X is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: 'x' });
await globalHandlers(event);

expect(mockCurrentWebContents.cut).toHaveBeenCalled();
});

it('should perform a copy when Ctrl+C is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: 'c' });
await globalHandlers(event);

expect(mockCurrentWebContents.copy).toHaveBeenCalled();
});

it('should perform a paste when Ctrl+V is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: 'v' });
await globalHandlers(event);

expect(mockCurrentWebContents.paste).toHaveBeenCalled();
});

it('should reset the zoom level when Ctrl+0 is pressed', async () => {
const event = new KeyboardEvent('keydown', { ctrlKey: true, key: '0' });
await globalHandlers(event);
Expand Down
25 changes: 0 additions & 25 deletions packages/app/client/src/utils/eventHandlers.ts
Expand Up @@ -66,31 +66,6 @@ class EventHandlers {
awaitable = EventHandlers.commandService.call(ShowBotCreationDialog);
}

// Ctrl+Z
if (ctrlOrCmdPressed && key === 'z') {
remote.getCurrentWebContents().undo();
}

// Ctrl+Y
if (ctrlOrCmdPressed && key === 'y') {
remote.getCurrentWebContents().redo();
}

// Ctrl+X
if (ctrlOrCmdPressed && key === 'x') {
remote.getCurrentWebContents().cut();
}

// Ctrl+C
if (ctrlOrCmdPressed && key === 'c') {
remote.getCurrentWebContents().copy();
}

// Ctrl+V
if (ctrlOrCmdPressed && key === 'v') {
remote.getCurrentWebContents().paste();
}

// Ctrl+0
if (ctrlOrCmdPressed && key === '0') {
remote.getCurrentWebContents().setZoomLevel(0);
Expand Down
22 changes: 13 additions & 9 deletions packages/extensions/json/bf-extension.json
Expand Up @@ -42,13 +42,14 @@
"states": {
"default": {
"icon": "leftArrow",
"aria-label": "Previous",
"aria-label": "Previous bot state",
"title":"Previous"
},
"selected": {
"icon": "leftArrowSelected",
"aria-label": "Previous",
"aria-selected": true
"aria-label": "Previous bot state",
"aria-selected": true,
"title":"Previous"
},
"disabled": {
"aria-disabled": true
Expand All @@ -60,13 +61,14 @@
"states": {
"default": {
"icon": "rightArrow",
"aria-label": "Next",
"aria-label": "Next bot state",
"title":"Next"
},
"selected": {
"icon": "rightArrowSelected",
"aria-label": "Next",
"aria-selected": true
"aria-label": "Next bot state",
"aria-selected": true,
"title":"Next"
},
"disabled": {
"aria-disabled": true
Expand All @@ -76,14 +78,16 @@
{
"id": "diff",
"states": {
"default": {
"default": {
"label": "Show diff",
"title":"Show diff"
"title": "Show diff",
"aria-label": "Show diff"
},
"selected": {
"label": "Hide diff",
"aria-selected": true,
"title":"Hide diff"
"title": "Hide diff",
"aria-label": "Hide diff"
},
"disabled": {
"aria-disabled": true
Expand Down

0 comments on commit 00172c5

Please sign in to comment.