From b80a0c62ebd4893698272ffc4df8b2714c61ed03 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Mon, 4 Nov 2024 17:16:49 -0800 Subject: [PATCH] makes new UX the default UX, share redemptions updated to point to new path, old dashboard avail through menu (#208) --- workbench-app/src/Constants.ts | 2 +- .../src/components/App/ExperimentalNotice.tsx | 32 ++++++++++-- .../src/components/FrontDoor/Chat/Chat.tsx | 10 +++- .../Controls/ConversationListOptions.tsx | 42 ++++++++++------ .../FrontDoor/Controls/SiteMenuButton.tsx | 2 +- .../src/components/FrontDoor/MainContent.tsx | 2 + .../src/libs/useConversationUtility.ts | 8 ++- workbench-app/src/main.tsx | 8 ++- .../src/redux/features/app/AppState.ts | 1 + .../src/redux/features/app/appSlice.ts | 8 +++ workbench-app/src/routes/Dashboard.tsx | 50 +++++++++---------- workbench-app/src/routes/ShareRedeem.tsx | 15 ++++-- 12 files changed, 121 insertions(+), 59 deletions(-) diff --git a/workbench-app/src/Constants.ts b/workbench-app/src/Constants.ts index fafacae7..f3f2d8ad 100644 --- a/workbench-app/src/Constants.ts +++ b/workbench-app/src/Constants.ts @@ -1,7 +1,7 @@ export const Constants = { app: { name: 'Semantic Workbench', - conversationRedirectPath: '/frontdoor', + conversationRedirectPath: '', defaultTheme: 'light', defaultBrand: 'local', autoScrollThreshold: 100, diff --git a/workbench-app/src/components/App/ExperimentalNotice.tsx b/workbench-app/src/components/App/ExperimentalNotice.tsx index 4d5481a3..0502effc 100644 --- a/workbench-app/src/components/App/ExperimentalNotice.tsx +++ b/workbench-app/src/components/App/ExperimentalNotice.tsx @@ -9,15 +9,17 @@ import { Image, Link, MessageBar, + MessageBarActions, MessageBarBody, MessageBarTitle, makeStyles, shorthands, tokens, } from '@fluentui/react-components'; +import { DismissRegular } from '@fluentui/react-icons'; import React from 'react'; import { useAppDispatch, useAppSelector } from '../../redux/app/hooks'; -import { setCompletedFirstRun } from '../../redux/features/app/appSlice'; +import { setCompletedFirstRun, setHideExperimentalNotice } from '../../redux/features/app/appSlice'; const useClasses = makeStyles({ surface: { @@ -57,9 +59,16 @@ const useClasses = makeStyles({ }, }); -export const ExperimentalNotice: React.FC = () => { +interface ExperimentalNoticeProps { + className?: string; + containerAction?: React.ReactElement; + actions?: React.ReactElement | React.ReactElement[]; +} + +export const ExperimentalNotice: React.FC = (props) => { + const { className, containerAction, actions } = props; const classes = useClasses(); - const completedFirstRun = useAppSelector((state) => state.app.completedFirstRun); + const { completedFirstRun, hideExperimentalNotice } = useAppSelector((state) => state.app); const dispatch = useAppDispatch(); const [showDialog, setShowDialog] = React.useState(!completedFirstRun?.experimental); const [currentIndex, setCurrentIndex] = React.useState(0); @@ -137,6 +146,18 @@ export const ExperimentalNotice: React.FC = () => { }, ]; + const defaultContainerAction = ( + - + +