Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
56240da
add placeholder for schema validator
yeze322 Mar 23, 2021
bd7da86
add schema validator pipeline with mocked fn
yeze322 Mar 25, 2021
f854c39
add schema visitor
yeze322 Apr 1, 2021
cf33399
display diagnostics data in debug panel
yeze322 Apr 1, 2021
0c8b635
Merge branch 'main' into diagnostics/schema
yeze322 Apr 1, 2021
c6984b8
revert sdk.ts
yeze322 Apr 1, 2021
c84f517
decrease schema diagnostic severity to 'Warning'
yeze322 Apr 1, 2021
7b27afd
optmize path join logic
yeze322 Apr 2, 2021
733f68f
impl a unified walker covers SwitchCondition
yeze322 Apr 2, 2021
c37c6d2
fix lint error: use BaseSchema
yeze322 Apr 6, 2021
cd3bc04
feat: disable actions without schema
yeze322 Apr 6, 2021
f48e74f
wrap in useEffect
yeze322 Apr 7, 2021
aa91b42
optimization: avoid frequent recoil submission
yeze322 Apr 7, 2021
dd115dc
Merge branch 'main' into diagnostics/schema
yeze322 Apr 7, 2021
d530195
optimization: aggregate paths rather than updatedDialog to reduce tim…
yeze322 Apr 7, 2021
8081a07
chore: comments & var name
yeze322 Apr 7, 2021
42dc900
Merge branch 'diagnostics/schema' of https://github.com/yeze322/BotFr…
yeze322 Apr 7, 2021
a27fe70
lint
yeze322 Apr 7, 2021
bc9fe60
add comments
yeze322 Apr 7, 2021
3b473ec
Merge branch 'main' into diagnostics/schema
yeze322 Apr 8, 2021
4d76832
Merge branch 'main' into diagnostics/schema
cwhitten Apr 12, 2021
c2f4285
Merge branch 'main' into diagnostics/schema
cwhitten Apr 12, 2021
f345aa8
Merge branch 'main' into diagnostics/schema
cwhitten Apr 13, 2021
caa2ba6
Merge branch 'main' into diagnostics/schema
cwhitten Apr 13, 2021
39cef78
Merge remote-tracking branch 'zeye/diagnostics/schema' into main
yeze322 Apr 15, 2021
9bdb645
defense undefined skip-level 'actions'
yeze322 Apr 15, 2021
5788b6a
defense potential exceptions
yeze322 Apr 15, 2021
1c62fd2
Merge branch 'main' into zeye/schema-validation
yeze322 Apr 15, 2021
8e534b1
get sdk.schema content correctly
yeze322 Apr 15, 2021
16ed47f
Merge branch 'zeye/schema-validation' of https://github.com/microsoft…
yeze322 Apr 15, 2021
c2e461a
fix lint
yeze322 Apr 15, 2021
59fb65b
Merge branch 'main' into zeye/schema-validation
yeze322 Apr 15, 2021
e757e1b
fix folder name case problem
yeze322 Apr 15, 2021
d2c4e22
Merge branch 'main' into zeye/schema-validation
cwhitten Apr 16, 2021
4080b6e
Do not specify the luis endpoint key as a parameter to the runtime if…
benbrown Apr 22, 2021
8635df9
disable telemetry calls in the provision dialog while we investigate …
benbrown Apr 22, 2021
5106247
prefer the botName field instead of the name field when managing conn…
benbrown Apr 22, 2021
f24852f
fix: Empty Webchat inspector text and Disabling items in PVA context …
srinaath Apr 22, 2021
aa9305e
show floating notifications over eveything (#7269)
hatpick Apr 22, 2021
8437fab
Region for Microsoft Bot Channels Registration is now global (#7270)
VamsiModem Apr 22, 2021
e878aab
fix: adjust package manager feeds (#7243)
benbrown Apr 22, 2021
73f5d4b
fix: remodel About page (#7191)
beyackle Apr 22, 2021
dad82c1
Merge branch 'main' into zeye/schema-validation
cwhitten Apr 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const descriptionText = css`
`;

const descriptionLongText = css`
overflow: auto;
font-size: small;
white-space: pre-wrap;
`;
const descriptionShow = css``;
const descriptionHide = css`
Expand Down
39 changes: 15 additions & 24 deletions Composer/packages/client/src/components/GetStarted/GetStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import { jsx } from '@emotion/core';
import React from 'react';
import formatMessage from 'format-message';
import { Panel, IPanelStyles } from 'office-ui-fabric-react/lib/Panel';
import { Pivot, PivotItem, IPivotStyles } from 'office-ui-fabric-react/lib/Pivot';
import { Panel, IPanelStyles, PanelType } from 'office-ui-fabric-react/lib/Panel';
import { Pivot, PivotItem } from 'office-ui-fabric-react/lib/Pivot';
import { Stack } from 'office-ui-fabric-react/lib/Stack';

import { GetStartedNextSteps } from './GetStartedNextSteps';
import { GetStartedLearn } from './GetStartedLearn';
Expand All @@ -25,45 +26,35 @@ const panelStyles = {
root: {
marginTop: 50,
},
navigation: {
display: 'block',
height: 'auto',
},
} as IPanelStyles;

const pivotStyles = { root: { paddingLeft: 20, paddingTop: 10, width: '100%' } } as IPivotStyles;

export const GetStarted: React.FC<GetStartedProps> = (props) => {
const { projectId, onDismiss } = props;

const renderTabs = () => {
return (
<Pivot styles={pivotStyles}>
<PivotItem headerText={formatMessage('Next steps')}>
<GetStartedNextSteps {...props} />
</PivotItem>
<PivotItem headerText={formatMessage('Learning')}>
<GetStartedLearn projectId={projectId} onDismiss={onDismiss} />
</PivotItem>
</Pivot>
<Stack grow styles={{ root: { alignSelf: 'flex-start', padding: '0 20px' } }}>
<Pivot>
<PivotItem headerText={formatMessage('Next steps')}>
<GetStartedNextSteps {...props} />
</PivotItem>
<PivotItem headerText={formatMessage('Learning')}>
<GetStartedLearn projectId={projectId} onDismiss={onDismiss} />
</PivotItem>
</Pivot>
</Stack>
);
};

const onRenderNavigationContent = React.useCallback(
(props, defaultRender) => (
<div css={{ position: 'absolute', top: 15, right: 0, zIndex: 1 }}>{defaultRender(props)}</div>
),
[]
);

return (
<Panel
customWidth="395px"
isBlocking={false}
isOpen={props.isOpen}
styles={panelStyles}
type={PanelType.custom}
onDismiss={props.onDismiss}
onRenderHeader={renderTabs}
onRenderNavigationContent={onRenderNavigationContent}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { dispatcherState, settingsState } from '../../recoilModel';
import { mergePropertiesManagedByRootBot } from '../../recoilModel/dispatchers/utils/project';
import { rootBotProjectIdSelector } from '../../recoilModel/selectors/project';
import { navigateTo } from '../../utils/navigation';
import { DisableFeatureToolTip } from '../DisableFeatureToolTip';
import { usePVACheck } from '../../hooks/usePVACheck';

import { GetStartedTask } from './GetStartedTask';
import { NextSteps } from './types';
Expand Down Expand Up @@ -48,6 +50,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {

const [highlightLUIS, setHighlightLUIS] = useState<boolean>(false);
const [highlightQNA, setHighlightQNA] = useState<boolean>(false);
const isPVABot = usePVACheck(projectId);

const hideManageLuis = () => {
setDisplayManageLuis(false);
Expand Down Expand Up @@ -131,6 +134,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
setDisplayManageLuis(true);
}
},
isDisabled: isPVABot,
});
}
if (props.requiresQNA) {
Expand All @@ -151,6 +155,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
setDisplayManageQNA(true);
}
},
isDisabled: isPVABot,
});
}
setRequiredNextSteps(newNextSteps);
Expand All @@ -170,6 +175,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'publishing', priority: 'recommended' });
openLink(linkToPublishProfile);
},
isDisabled: false,
});
}
setRecommendedNextSteps(newRecomendedSteps);
Expand All @@ -185,6 +191,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'packages', priority: 'optional' });
openLink(linkToPackageManager);
},
isDisabled: isPVABot,
},
{
key: 'editlg',
Expand All @@ -196,6 +203,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'editlg', priority: 'optional' });
openLink(linkToLGEditor);
},
isDisabled: false,
},
{
key: 'editlu',
Expand All @@ -207,6 +215,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'editlu', priority: 'optional' });
openLink(linkToLUEditor);
},
isDisabled: false,
},
{
key: 'insights',
Expand All @@ -220,6 +229,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'insights', priority: 'optional' });
openLink(linkToAppInsights);
},
isDisabled: isPVABot,
},
{
key: 'devops',
Expand All @@ -231,6 +241,7 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'devops', priority: 'optional' });
openLink(linkToDevOps);
},
isDisabled: false,
},
];

Expand All @@ -245,12 +256,19 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
TelemetryClient.track('GettingStartedActionClicked', { taskName: 'connections', priority: 'optional' });
openLink(linkToConnections);
},
isDisabled: isPVABot,
});
}

setOptionalSteps(optSteps);
}, [botProject, props.requiresLUIS, props.requiresQNA, props.showTeachingBubble]);

const getStartedTaskElement = (step: NextSteps) => (
<DisableFeatureToolTip key={'disableToolTip-' + step.key} isPVABot>
<GetStartedTask key={step.key} step={step} />
</DisableFeatureToolTip>
);

return (
<ScrollablePane styles={{ root: { marginTop: 60 } }}>
<div css={{ paddingTop: 20, paddingLeft: 27, paddingRight: 20 }}>
Expand Down Expand Up @@ -304,27 +322,21 @@ export const GetStartedNextSteps: React.FC<GetStartedProps> = (props) => {
{requiredNextSteps.length ? (
<div>
<h3 style={h3Style}>{formatMessage('Required')}</h3>
{requiredNextSteps.map((step) => (
<GetStartedTask key={step.key} step={step} />
))}
{requiredNextSteps.map((step) => getStartedTaskElement(step))}
</div>
) : null}

{recommendedNextSteps.length ? (
<div>
<h3 style={h3Style}>{formatMessage('Recommended')}</h3>
{recommendedNextSteps.map((step) => (
<GetStartedTask key={step.key} step={step} />
))}
{recommendedNextSteps.map((step) => getStartedTaskElement(step))}
</div>
) : null}

{optionalSteps.length ? (
<div>
<h3 style={h3Style}>{formatMessage('Optional')}</h3>
{optionalSteps.map((step) => (
<GetStartedTask key={step.key} step={step} />
))}
{optionalSteps.map((step) => getStartedTaskElement(step))}
</div>
) : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { css, jsx } from '@emotion/core';
import React from 'react';
import { FluentTheme, SharedColors } from '@uifabric/fluent-theme';
import { ActionButton } from 'office-ui-fabric-react/lib/Button';
Expand All @@ -15,6 +15,12 @@ type TaskProps = {
step: NextSteps;
};

const getStartedStepStyle = (disabled?: boolean) => css`
margin-bottom: 20px;
pointer-events: ${disabled ? 'none' : 'auto'};
opacity: ${disabled ? 0.4 : 1};
`;

export const GetStartedTask: React.FC<TaskProps> = (props) => {
const icon = props.step.checked ? 'CompletedSolid' : props.step.required ? 'Error' : 'Completed';
const color = props.step.checked
Expand All @@ -23,7 +29,7 @@ export const GetStartedTask: React.FC<TaskProps> = (props) => {
? SharedColors.orange20
: SharedColors.cyanBlue10;
return (
<div css={{ marginBottom: 20 }}>
<div css={getStartedStepStyle(props.step.isDisabled)}>
<ActionButton
iconProps={{ iconName: icon, id: props.step.key }}
styles={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export type NextSteps = {
label: string;
onClick: (step?: NextSteps) => void;
highlight?: (step?: NextSteps) => void;
isDisabled: boolean;
};
35 changes: 18 additions & 17 deletions Composer/packages/client/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const Header = () => {
const locale = useRecoilValue(localeState(projectId));
const appUpdate = useRecoilValue(appUpdateState);
const [teachingBubbleVisibility, setTeachingBubbleVisibility] = useState<boolean>();
const [showGetStartedTeachingBubble, setshowGetStartedTeachingBubble] = useState<boolean>(false);
const [showGetStartedTeachingBubble, setShowGetStartedTeachingBubble] = useState<boolean>(false);
const settings = useRecoilValue(settingsState(projectId));
const isWebChatPanelVisible = useRecoilValue(isWebChatPanelVisibleState);
const botProjectSolutionLoaded = useRecoilValue(botProjectSpaceLoadedState);
Expand Down Expand Up @@ -213,10 +213,10 @@ export const Header = () => {
// pop out get started if #getstarted is in the URL
useEffect(() => {
if (location.hash === '#getstarted') {
setshowGetStartedTeachingBubble(true);
setShowGetStartedTeachingBubble(true);
setShowGetStarted(true);
} else {
setshowGetStartedTeachingBubble(false);
setShowGetStartedTeachingBubble(false);
}
}, [location]);

Expand Down Expand Up @@ -386,7 +386,7 @@ export const Header = () => {
<Panel
isHiddenOnDismiss
closeButtonAriaLabel={formatMessage('Close')}
customWidth={'395px'}
customWidth="395px"
headerText={projectName}
isBlocking={false}
isOpen={isWebChatPanelVisible}
Expand Down Expand Up @@ -418,20 +418,21 @@ export const Header = () => {
isWebChatPanelVisible={isWebChatPanelVisible}
/>
) : null}
<GetStarted
isOpen={botProjectSolutionLoaded && showGetStarted}
projectId={rootBotProjectId}
requiresLUIS={requiresLUIS}
requiresQNA={requiresQNA}
showTeachingBubble={botProjectSolutionLoaded && showGetStartedTeachingBubble}
onBotReady={() => {
setShowTeachingBubble(true);
}}
onDismiss={() => {
toggleGetStarted(false);
}}
/>
</Panel>

<GetStarted
isOpen={botProjectSolutionLoaded && showGetStarted}
projectId={rootBotProjectId}
requiresLUIS={requiresLUIS}
requiresQNA={requiresQNA}
showTeachingBubble={botProjectSolutionLoaded && showGetStartedTeachingBubble}
onBotReady={() => {
setShowTeachingBubble(true);
}}
onDismiss={() => {
toggleGetStarted(false);
}}
/>
</div>
);
};
1 change: 1 addition & 0 deletions Composer/packages/client/src/components/NavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const link = (active: boolean, disabled: boolean) => css`
: `&:hover {
background-color: ${NeutralColors.gray50};
}

&:focus {
outline: none;
.ms-Fabric--isFocusVisible &::after {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import isEmpty from 'lodash/isEmpty';
import { Layer } from 'office-ui-fabric-react/lib/Layer';
import { useRecoilValue } from 'recoil';

import { dispatcherState } from '../../recoilModel';
import { notificationsSelector } from '../../recoilModel/selectors/notifications';
import { zIndices } from '../../utils/zIndices';

import { NotificationCard } from './NotificationCard';

// -------------------- Styles -------------------- //

const container = css`
cursor: default;
top: 50px;
height: calc(100vh - 50px);
position: absolute;
right: 0px;
padding: 6px;
z-index: 1;
`;

const layerStyles = { root: { zIndex: zIndices.notificationContainer } };

// -------------------- NotificationContainer -------------------- //

export const NotificationContainer = () => {
Expand All @@ -30,18 +35,20 @@ export const NotificationContainer = () => {
if (isEmpty(notifications)) return null;

return (
<div css={container} role="presentation">
{notifications.map((item) => {
return (
<NotificationCard
key={item.id}
cardProps={item}
id={item.id}
onDismiss={deleteNotification}
onHide={hideNotification}
/>
);
})}
</div>
<Layer styles={layerStyles}>
<div css={container} role="presentation">
{notifications.map((item) => {
return (
<NotificationCard
key={item.id}
cardProps={item}
id={item.id}
onDismiss={deleteNotification}
onHide={hideNotification}
/>
);
})}
</div>
</Layer>
);
};
Loading