From 8d7205bc5be06ef1f670830606797fa608e8e46d Mon Sep 17 00:00:00 2001 From: Kerry Date: Sat, 26 Aug 2023 02:17:46 +1200 Subject: [PATCH] Rename Home tab to Sessions (#1568) * rename /account/emails route to profile * rename tab to sessions * quick design pass and new session labels * align copy on list pages with home page * comment * remove support for /emails * bad unit test for Layout * update snapshots, fix layout test * fix snapshots from old version of compound * better layout test * coverage? * userhome styles * move no primary email alert to email list * update snapshots * Remove obselete snapshot & remove unnecessary logs --------- Co-authored-by: Quentin Gliech --- .../src/__snapshots__/Router.test.tsx.snap | 3 - .../src/components/BrowserSessionList.tsx | 2 +- frontend/src/components/CompatSessionList.tsx | 5 +- frontend/src/components/Layout.test.tsx | 2 +- frontend/src/components/Layout.tsx | 2 +- frontend/src/components/OAuth2SessionList.tsx | 5 +- frontend/src/components/UserEmailList.tsx | 6 + .../components/UserHome/UserHome.module.css | 34 ++ .../components/UserHome/UserHome.stories.tsx | 11 - .../src/components/UserHome/UserHome.test.tsx | 88 +--- frontend/src/components/UserHome/UserHome.tsx | 75 +-- .../__snapshots__/UserHome.test.tsx.snap | 441 +++++------------- .../__snapshots__/Layout.test.tsx.snap | 2 +- 13 files changed, 225 insertions(+), 451 deletions(-) delete mode 100644 frontend/src/__snapshots__/Router.test.tsx.snap create mode 100644 frontend/src/components/UserHome/UserHome.module.css diff --git a/frontend/src/__snapshots__/Router.test.tsx.snap b/frontend/src/__snapshots__/Router.test.tsx.snap deleted file mode 100644 index ca9514cd7..000000000 --- a/frontend/src/__snapshots__/Router.test.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Router > routes 1`] = `"Loading..."`; diff --git a/frontend/src/components/BrowserSessionList.tsx b/frontend/src/components/BrowserSessionList.tsx index 22cc5ce19..99609320d 100644 --- a/frontend/src/components/BrowserSessionList.tsx +++ b/frontend/src/components/BrowserSessionList.tsx @@ -146,7 +146,7 @@ const BrowserSessionList: React.FC<{ userId: string }> = ({ userId }) => { return ( - List of browser sessions: + Browser: paginate(prevPage) : null} onNext={nextPage ? (): void => paginate(nextPage) : null} diff --git a/frontend/src/components/CompatSessionList.tsx b/frontend/src/components/CompatSessionList.tsx index 1a4a33a51..28666903c 100644 --- a/frontend/src/components/CompatSessionList.tsx +++ b/frontend/src/components/CompatSessionList.tsx @@ -118,8 +118,7 @@ const CompatSessionList: React.FC<{ userId: string }> = ({ userId }) => { if (isErr(result)) return ; const compatSessionList = unwrapOk(result); - if (compatSessionList === null) - return <>Failed to load list of compatibility sessions.; + if (compatSessionList === null) return <>Failed to load sessions.; const paginate = (pagination: Pagination): void => { startTransition(() => { @@ -138,7 +137,7 @@ const CompatSessionList: React.FC<{ userId: string }> = ({ userId }) => { return ( - List of compatibility sessions: + Regular apps