Skip to content

Commit

Permalink
Merge pull request #1164 from Microsoft/toanzian/#934-az-storage
Browse files Browse the repository at this point in the history
Toanzian/#934 az storage
  • Loading branch information
tonyanziano authored Dec 10, 2018
2 parents 8bacc53 + 4c74bdf commit 2620753
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

.connected-service-editor {
width: 400px;
}
Expand Down Expand Up @@ -40,30 +73,3 @@ ul.kv-pair-container {
.no-border {
border: none;
}

.add-kv-pair-button {
border: none;
padding: 0 0 0 18px;
background: transparent;
position: relative;
cursor: pointer;

&:hover {
color: var(-p-button-color);

&::before {
background: var(--p-button-bg-hover);
}
}

&::before {
position: absolute;
left: 0;
content: '';
width: 16px;
height: 16px;
-webkit-mask: url("../../../../media/ic_add_thin.svg");
-webkit-mask-size: 16px;
background: var(--p-button-bg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export const connectedServiceEditor: string;
export const header: string;
export const kvPairContainer: string;
export const noBorder: string;
export const addKvPairButton: string;
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import { PrimaryButton } from '@bfemulator/ui-react';
import { LuisService } from 'botframework-config/lib/models';
import { ServiceTypes } from 'botframework-config/lib/schema';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp
const { serviceType } = this.props;
return (
<p>
{ `You can find your knowledge base ID and subscription key in ` }
{ `You can find your knowledge base ID and subscription key in the ` }
<a href="https://portal.azure.com">
the Azure Portal { labelMap[serviceType] }
Azure Portal.
</a>
<br/>
<a href={ this.learnMoreLink }>
Expand All @@ -314,9 +314,9 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp
const { serviceType } = this.props;
return (
<p>
{ `You can find the information below in ` }
{ `You can find the information below in the ` }
<a href="https://portal.azure.com">
the Azure Portal { labelMap[serviceType] }.
Azure Portal.
</a>
<br/>
<a href={ this.learnMoreLink }>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import { mount } from 'enzyme';
import * as React from 'react';
import { KvPair } from './kvPair';
Expand All @@ -20,14 +53,7 @@ describe('The KvPair component', () => {

it('should render at least one empty row when at least one non-empty row exist in the data', () => {
const instance = node.instance();
expect(instance.render().props.children.length).toBe(3);
});

it('should increment state.length when "onAddKvPairClick()" is called', () => {
const instance = node.instance();
const { length } = node.state();
instance.onAddKvPairClick();
expect(node.state().length).toBe(length + 1);
expect(instance.render().props.children.length).toBe(2);
});

it('should call the given callback with the updated kv pairs when "onChange()" is called', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import { TextField } from '@bfemulator/ui-react';
import * as React from 'react';
import { ChangeEvent, Component, ReactNode } from 'react';
Expand Down Expand Up @@ -67,11 +100,6 @@ export class KvPair extends Component<KvPairProps, KvPairState> {
<ul className={ styles.kvPairContainer }>
{ rows }
</ul>
<button
className={ styles.addKvPairButton }
onClick={ this.onAddKvPairClick }>
Add a key-value pair
</button>
</div>
);
}
Expand All @@ -96,10 +124,6 @@ export class KvPair extends Component<KvPairProps, KvPairState> {
);
}

private onAddKvPairClick = (): void => {
this.setState({ length: this.state.length + 1 });
}

private onChange = (event: ChangeEvent<HTMLInputElement>): void => {
const { target } = event;
const { prop } = target.dataset;
Expand Down
7 changes: 6 additions & 1 deletion packages/app/client/src/ui/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@
font-weight: 600;
}

input, textarea, button, select, p, a {
input, textarea, button, select, p {
font-family: var(--default-font-family);
font-weight: 400;
}

a {
font-family: var(--default-font-family);
font-weight: 600;
}

div {
box-sizing: border-box;
}
Expand Down

0 comments on commit 2620753

Please sign in to comment.