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
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
122 changes: 65 additions & 57 deletions Composer/packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,63 +19,71 @@ initializeIcons(undefined, { disableWarnings: true });
// eslint-disable-next-line react/display-name
const Content = forwardRef<HTMLDivElement>((props, ref) => <div css={content} {...props} ref={ref} />);

const topLinks = (botLoaded: boolean) => [
{
to: '/home',
iconName: 'Home',
labelName: 'Home',
activeIfUrlContains: 'home',
exact: true,
},
{
to: '/dialogs/Main',
iconName: 'SplitObject',
labelName: 'Design Flow',
activeIfUrlContains: 'dialogs',
exact: false,
underTest: !botLoaded,
},
{
to: '/test-conversation',
iconName: 'WaitListConfirm',
labelName: 'Test Conversation',
activeIfUrlContains: '',
exact: false,
underTest: true, // will delete
},
{
to: 'language-generation/',
iconName: 'Robot',
labelName: 'Bot Says',
activeIfUrlContains: 'language-generation',
exact: false,
underTest: !botLoaded,
},
{
to: 'language-understanding/',
iconName: 'People',
labelName: 'User Says',
activeIfUrlContains: 'language-understanding',
exact: false,
underTest: !botLoaded,
},
{
to: '/evaluate-performance',
iconName: 'Chart',
labelName: 'Evaluate performance',
activeIfUrlContains: '',
exact: false,
underTest: true, // will delete
},
{
to: '/setting/',
iconName: 'Settings',
labelName: 'Settings',
activeIfUrlContains: 'setting',
exact: false,
underTest: !botLoaded,
},
];
const topLinks = (botLoaded: boolean) => {
let links = [
{
to: '/home',
iconName: 'Home',
labelName: 'Home',
activeIfUrlContains: 'home',
exact: true,
},
{
to: '/dialogs/Main',
iconName: 'SplitObject',
labelName: 'Design Flow',
activeIfUrlContains: 'dialogs',
exact: false,
underTest: !botLoaded,
},
{
to: '/test-conversation',
iconName: 'WaitListConfirm',
labelName: 'Test Conversation',
activeIfUrlContains: '',
exact: false,
underTest: true, // will delete
},
{
to: 'language-generation/',
iconName: 'Robot',
labelName: 'Bot Says',
activeIfUrlContains: 'language-generation',
exact: false,
underTest: !botLoaded,
},
{
to: 'language-understanding/',
iconName: 'People',
labelName: 'User Says',
activeIfUrlContains: 'language-understanding',
exact: false,
underTest: !botLoaded,
},
{
to: '/evaluate-performance',
iconName: 'Chart',
labelName: 'Evaluate performance',
activeIfUrlContains: '',
exact: false,
underTest: true, // will delete
},
{
to: '/setting/',
iconName: 'Settings',
labelName: 'Settings',
activeIfUrlContains: 'setting',
exact: false,
underTest: !botLoaded,
},
];

if (process.env.COMPOSER_AUTH_PROVIDER === 'abs-h') {
links = links.filter(link => link.to !== '/home');
}

return links;
};

const bottomLinks = [
{
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/TestController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import formatMessage from 'format-message';
import settingsStorage from './utils/dialogSettingStorage';
import { StoreContext } from './store';
import { bot, botButton, calloutLabel, calloutDescription, calloutContainer } from './styles';
import { BASEPATH, BotStatus, LuisConfig, Text } from './constants';
import { BotStatus, LuisConfig, Text } from './constants';
import { PublishLuisDialog } from './publishDialog';
import { OpenAlertModal, DialogStyle } from './components/Modal';
import { getReferredFiles } from './utils/luUtil';
Expand All @@ -37,7 +37,7 @@ const STATE = {
SUCCESS: 2,
};

const isAbsHosted = () => BASEPATH !== '' && BASEPATH !== '/';
const isAbsHosted = () => process.env.COMPOSER_AUTH_PROVIDER === 'abs-h';

export const TestController: React.FC = () => {
const { state, actions } = useContext(StoreContext);
Expand Down