From 9f85a1789bf2c0a3831d2bcfee1353826b9cbc56 Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Wed, 15 Apr 2020 14:17:08 -0700 Subject: [PATCH] a11y: add announcement region to app and announce copy/deletion (#2643) * add announcements to table view * linter stuff * use global context for announcement state * add announcements to table view * linter stuff * use global context for announcement state * add announcements to table view * linter stuff * use global context for announcement state * Update table-view.tsx * Update App.tsx --- Composer/packages/client/src/App.tsx | 16 +++++++++++++- .../packages/client/src/constants/index.ts | 2 ++ .../pages/language-generation/table-view.tsx | 22 ++++++++++++++----- .../packages/client/src/store/action/error.ts | 7 ++++++ Composer/packages/client/src/store/index.tsx | 1 + .../client/src/store/reducer/index.ts | 6 +++++ Composer/packages/client/src/store/types.ts | 1 + 7 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Composer/packages/client/src/App.tsx b/Composer/packages/client/src/App.tsx index 06c91a1491..019164816a 100644 --- a/Composer/packages/client/src/App.tsx +++ b/Composer/packages/client/src/App.tsx @@ -123,13 +123,27 @@ const bottomLinks = [ export const App: React.FC = () => { const { state, actions } = useContext(StoreContext); const [sideBarExpand, setSideBarExpand] = useState(false); - const { botName, projectId, dialogs, creationFlowStatus, locale, designPageLocation } = state; + + const { botName, projectId, dialogs, creationFlowStatus, locale, designPageLocation, announcement } = state; const { setCreationFlowStatus } = actions; const mapNavItemTo = x => resolveToBasePath(BASEPATH, x); const openedDialogId = designPageLocation.dialogId || dialogs.find(({ isRoot }) => isRoot === true)?.id || 'Main'; return ( +
+ {announcement} +