diff --git a/Composer/cypress/integration/HomePage.spec.ts b/Composer/cypress/integration/HomePage.spec.ts index a7fef16dbc..4ad18a1fd7 100644 --- a/Composer/cypress/integration/HomePage.spec.ts +++ b/Composer/cypress/integration/HomePage.spec.ts @@ -67,7 +67,10 @@ context('Home Page ', () => { }); }); - it('can save as a new bot from an existing bot', () => { + // We are disabling this test since we are temporarily removing + // this feature in R13 since we don't have a clear definition or solution + // for copying parent bots and skills. + xit('can save as a new bot from an existing bot', () => { cy.createTestBot('EmptySample', ({ id }) => { cy.visit(`/bot/${id}`); cy.findByTestId('LeftNav-CommandBarButtonHome').click(); diff --git a/Composer/packages/client/src/components/Notifications/NotificationCard.tsx b/Composer/packages/client/src/components/Notifications/NotificationCard.tsx index cfb93a6f3d..698cc92edf 100644 --- a/Composer/packages/client/src/components/Notifications/NotificationCard.tsx +++ b/Composer/packages/client/src/components/Notifications/NotificationCard.tsx @@ -44,6 +44,7 @@ const cardContainer = (show: boolean, ref?: HTMLDivElement | null) => () => { animation-timing-function: ${show ? 'cubic-bezier(0.1, 0.9, 0.2, 1)' : 'linear'}; animation-fill-mode: both; animation-name: ${show ? fadeIn : fadeOut(height)}; + pointer-events: auto; `; }; diff --git a/Composer/packages/client/src/components/Notifications/NotificationContainer.tsx b/Composer/packages/client/src/components/Notifications/NotificationContainer.tsx index 9f7c8dbf87..36e5c7dd71 100644 --- a/Composer/packages/client/src/components/Notifications/NotificationContainer.tsx +++ b/Composer/packages/client/src/components/Notifications/NotificationContainer.tsx @@ -22,6 +22,7 @@ const container = css` position: absolute; right: 0px; padding: 6px; + pointer-events: none; `; const layerStyles = { root: { zIndex: zIndices.notificationContainer } }; diff --git a/Composer/packages/client/src/pages/home/Home.tsx b/Composer/packages/client/src/pages/home/Home.tsx index 42d08c475c..2fc967dfcd 100644 --- a/Composer/packages/client/src/pages/home/Home.tsx +++ b/Composer/packages/client/src/pages/home/Home.tsx @@ -15,14 +15,8 @@ import { useRecoilValue } from 'recoil'; import { Toolbar, IToolbarItem } from '@bfc/ui-shared'; import { CreationFlowStatus } from '../../constants'; -import { dispatcherState, botDisplayNameState } from '../../recoilModel'; -import { - recentProjectsState, - feedState, - templateIdState, - currentProjectIdState, - warnAboutDotNetState, -} from '../../recoilModel/atoms/appState'; +import { dispatcherState } from '../../recoilModel'; +import { recentProjectsState, feedState, warnAboutDotNetState } from '../../recoilModel/atoms/appState'; import TelemetryClient from '../../telemetry/TelemetryClient'; import composerDocumentIcon from '../../images/composerDocumentIcon.svg'; import stackoverflowIcon from '../../images/stackoverflowIcon.svg'; @@ -68,11 +62,17 @@ const resources = [ ]; const Home: React.FC = () => { - const projectId = useRecoilValue(currentProjectIdState); - const botName = useRecoilValue(botDisplayNameState(projectId)); + // These variables are used in the save as method which is currently disabled until we + // determine the appropriate save as behavior for parent bots and skills. Since we are + // planning to add the feature back in the next release, I am commenting out this section + // of code instead of removing it. See comment below for more details. + // + // const projectId = useRecoilValue(currentProjectIdState); + // const botName = useRecoilValue(botDisplayNameState(projectId)); + // const templateId = useRecoilValue(templateIdState); + const recentProjects = useRecoilValue(recentProjectsState); const feed = useRecoilValue(feedState); - const templateId = useRecoilValue(templateIdState); const { openProject, setCreationFlowStatus, setCreationFlowType, setWarnAboutDotNet } = useRecoilValue( dispatcherState ); @@ -128,23 +128,30 @@ const Home: React.FC = () => { dataTestid: 'homePage-Toolbar-Open', disabled: false, }, - { - type: 'action', - text: formatMessage('Save as'), - buttonProps: { - iconProps: { - iconName: 'Save', - }, - onClick: () => { - setCreationFlowStatus(CreationFlowStatus.SAVEAS); - navigate(`projects/${projectId}/${templateId}/save`); - TelemetryClient.track('ToolbarButtonClicked', { name: 'saveAs' }); - }, - styles: home.toolbarButtonStyles, - }, - align: 'left', - disabled: botName ? false : true, - }, + // We are temporarily disabling the save as button until we can + // determine what the appropriate save as behavior should be for both + // parent bots and skills. + // + // Associated issue: + // https://github.com/microsoft/BotFramework-Composer/issues/6808#issuecomment-828758688 + // + // { + // type: 'action', + // text: formatMessage('Save as'), + // buttonProps: { + // iconProps: { + // iconName: 'Save', + // }, + // onClick: () => { + // setCreationFlowStatus(CreationFlowStatus.SAVEAS); + // navigate(`projects/${projectId}/${templateId}/save`); + // TelemetryClient.track('ToolbarButtonClicked', { name: 'saveAs' }); + // }, + // styles: home.toolbarButtonStyles, + // }, + // align: 'left', + // disabled: botName ? false : true, + // }, ]; return (
diff --git a/Composer/packages/lib/indexers/src/botIndexer.ts b/Composer/packages/lib/indexers/src/botIndexer.ts index caade14fa9..86c30f8a05 100644 --- a/Composer/packages/lib/indexers/src/botIndexer.ts +++ b/Composer/packages/lib/indexers/src/botIndexer.ts @@ -183,7 +183,7 @@ const checkSkillSetting = (assets: { dialogs: DialogInfo[]; botProjectFile: BotP const skillName = getSkillNameFromSetting(skillId) || skillId; diagnostics.push( new Diagnostic( - `The skill '${skillName}' does not exist in bot project file`, + `'${skillName}' does not exist in this project and is currently referenced in '${dialog.displayName}'.`, dialog.id, DiagnosticSeverity.Error )