Skip to content

Commit

Permalink
Merge branch 'master' into julong/choiceinput
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlong9278 committed Feb 12, 2020
2 parents 9e6c2cb + db96de4 commit a92dfda
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
.ObjectItem .ObjectItemField {
flex: 1;
overflow: hidden;
padding: 0px 18px;
padding: 0px 12px;
margin: 10px 0;
}

.ObjectItem .ObjectItemField {
padding: 0px 18px;
padding: 0px 12px;
margin: 10px 0;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import React from 'react';
import formatMessage from 'format-message';
import { MicrosoftInputDialog } from '@bfc/shared';
Expand All @@ -9,6 +11,7 @@ import { LgEditorWidget } from '../../widgets/LgEditorWidget';
import { WidgetLabel } from '../../widgets/WidgetLabel';
import { BFDFieldProps } from '../../types';

import { field } from './styles';
import { GetSchema, PromptFieldChangeHandler } from './types';

interface BotAsksProps extends BFDFieldProps<MicrosoftInputDialog> {
Expand All @@ -20,7 +23,7 @@ export const BotAsks: React.FC<BotAsksProps> = props => {
const { onChange, getSchema, formData, formContext } = props;

return (
<>
<div css={field}>
<WidgetLabel label={formatMessage('Prompt')} description={getSchema('prompt').description} />
<LgEditorWidget
name="prompt"
Expand All @@ -29,6 +32,6 @@ export const BotAsks: React.FC<BotAsksProps> = props => {
formContext={formContext}
height={125}
/>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const tabs: Partial<IPivotStyles> = {
flex: 1,
},
itemContainer: {
padding: '24px 18px',
padding: '12px 12px',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import { css } from '@emotion/core';

// offset ObjectField's margin
export const regexEditorContainer = css`
margin: 0 -18px -26px -18px;
margin: 0 -12px -26px -12px;
`;
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const RootField: React.FC<RootFieldProps> = props => {
styles={{ field: { fontWeight: FontWeights.semibold }, root: { margin: '5px 0 7px -9px' } }}
fontSize={FontSizes.size20}
/>
<p className="RootFieldSubtitle">{getSubTitle()}</p>
<p className={classnames('RootFieldSubtitle', FontClassNames.smallPlus)}>{getSubTitle()}</p>
{sdkOverrides.description !== false && (description || schema.description) && (
<p className={classnames('RootFieldDescription', FontClassNames.smallPlus)}>
{getDescription()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@
}
.RootFieldTitle {
border-bottom: 1px solid #c8c6c4;
padding: 0 18px;
padding: 0 12px;
margin-bottom: 0px;
}
.RootFieldSubtitle {
height: 15px;
line-height: 15px;
font-size: 12px;
font-weight: 600;
color: #4F4F4F;
margin: -7px 0 7px;
margin: 12px 0;
}
.RootFieldDescription {
margin-top: 0;
margin-bottom: 10px;
margin-bottom: 12px;
white-space: pre-line;
}
.RootFieldMetaData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import React from 'react';
import { render, cleanup } from 'react-testing-library';

import { ChoiceInput } from '../../../src/components/nodes/steps/ChoiceInput';
import { ObiTypes } from '../../../src/constants/ObiTypes';
import { ChoiceInput } from '../../src/widgets/ChoiceInput';
import { ObiTypes } from '../../src/constants/ObiTypes';

describe('<ChoiceInput />', () => {
let renderResult, id, data, onEvent, onResize;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export * from './steps/ChoiceInput';
export * from './steps/TextInput';
export * from './steps/BotAsks';
export * from './steps/UserInput';
export * from './steps/InvalidPromptBrick';

export * from './events/EventRule';
export * from './events/IntentRule';
export * from './events/UnknownIntentRule';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { PromptWidget } from '../widgets/PromptWidget';
import { IfConditionWidget } from '../widgets/IfConditionWidget';
import { SwitchConditionWidget } from '../widgets/SwitchConditionWidget';
import { ForeachWidget } from '../widgets/ForeachWidget';
import { ChoiceInputChoices } from '../widgets/ChoiceInput';
import { ElementIcon } from '../utils/obiPropertyResolver';
import { ObiColors } from '../constants/ElementColors';
import { ChoiceInputChoices } from '../components/nodes';
import { measureChoiceInputDetailBoundary } from '../layouters/measureJsonBoundary';

import { UISchema, UIWidget } from './uischema.types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { jsx } from '@emotion/core';
import { FC } from 'react';
import { DialogGroup, PromptTab } from '@bfc/shared';

import { ChoiceInputSize, ChoiceInputMarginTop } from '../../../constants/ElementSizes';
import { NodeEventTypes } from '../../../constants/NodeEventTypes';
import { NodeColors } from '../../../constants/ElementColors';
import { measureJsonBoundary } from '../../../layouters/measureJsonBoundary';
import { ElementIcon } from '../../../utils/obiPropertyResolver';
import { FormCard } from '../templates/FormCard';
import { NodeProps } from '../nodeProps';
import { getUserAnswersTitle } from '../utils';
import { ChoiceInputSize, ChoiceInputMarginTop } from '../constants/ElementSizes';
import { NodeEventTypes } from '../constants/NodeEventTypes';
import { NodeColors } from '../constants/ElementColors';
import { measureJsonBoundary } from '../layouters/measureJsonBoundary';
import { ElementIcon } from '../utils/obiPropertyResolver';
import { FormCard } from '../components/nodes/templates/FormCard';
import { NodeProps } from '../components/nodes/nodeProps';
import { getUserAnswersTitle } from '../components/nodes/utils';

export const ChoiceInputChoices = ({ choices }) => {
if (!Array.isArray(choices)) {
Expand Down

0 comments on commit a92dfda

Please sign in to comment.