From dbe1c0fa2e0a05ef7f1aadfd29d36adb7d1428d2 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Tue, 12 Sep 2023 17:11:12 +0300 Subject: [PATCH] AdminX various UI fixes (#18089) refs. https://github.com/TryGhost/Product/issues/3349 - some of the UI components' scrollbar was visible where it wasn't necessary - metadata preview was shown in view mode too - social accounts value was shown even if it was empty - user detail modal was missing field descriptions - it was not possible to reopen the Zapier modal after closing it the "Close" button - copy had to be updated for analytics export to make it clear what is going to be exported - invite modal had to be closed after successful invitation - toggle component was only active on the text itself, instead of the whole row --- apps/admin-x-settings/src/App.tsx | 2 +- .../src/admin-x-ds/global/TabView.tsx | 2 +- .../src/admin-x-ds/global/Table.tsx | 2 +- .../src/admin-x-ds/global/form/Form.tsx | 2 +- .../src/admin-x-ds/global/form/Toggle.tsx | 2 +- .../admin-x-ds/global/form/ToggleGroup.tsx | 29 +++++++++++++++++-- .../admin-x-ds/global/modal/PreviewModal.tsx | 2 +- .../settings/SettingGroupContent.tsx | 4 +-- .../src/admin-x-ds/settings/SettingValue.tsx | 17 +++++++---- .../src/components/Sidebar.tsx | 2 +- .../advanced/integrations/ZapierModal.tsx | 1 + .../newsletters/NewsletterDetailModal.tsx | 12 ++++---- .../settings/general/InviteUserModal.tsx | 4 +++ .../components/settings/general/Metadata.tsx | 18 +++++++----- .../settings/general/SocialAccounts.tsx | 6 ++-- .../settings/general/UserDetailModal.tsx | 10 +++++-- .../settings/membership/Analytics.tsx | 3 +- apps/admin-x-settings/src/styles/index.css | 9 ++++++ .../test/e2e/general/metadata.test.ts | 6 ---- .../test/e2e/general/users/invite.test.ts | 3 -- .../test/e2e/membership/analytics.test.ts | 2 +- .../test/e2e/site/design.test.ts | 2 +- 22 files changed, 94 insertions(+), 46 deletions(-) diff --git a/apps/admin-x-settings/src/App.tsx b/apps/admin-x-settings/src/App.tsx index f63c1b6b99..8668dc5db0 100644 --- a/apps/admin-x-settings/src/App.tsx +++ b/apps/admin-x-settings/src/App.tsx @@ -66,7 +66,7 @@ function App({ghostVersion, officialThemes, zapierTemplates, externalNavigate, d
-
+ {/*
*/}
diff --git a/apps/admin-x-settings/src/admin-x-ds/global/TabView.tsx b/apps/admin-x-settings/src/admin-x-ds/global/TabView.tsx index a3547f72bc..d7aa9fa459 100644 --- a/apps/admin-x-settings/src/admin-x-ds/global/TabView.tsx +++ b/apps/admin-x-settings/src/admin-x-ds/global/TabView.tsx @@ -40,7 +40,7 @@ function TabView({ }; const containerClasses = clsx( - 'flex w-full overflow-x-scroll', + 'no-scrollbar flex w-full overflow-x-auto', width === 'narrow' && 'gap-3', width === 'normal' && 'gap-5', width === 'wide' && 'gap-7', diff --git a/apps/admin-x-settings/src/admin-x-ds/global/Table.tsx b/apps/admin-x-settings/src/admin-x-ds/global/Table.tsx index cbab0ed22f..6194c89c68 100644 --- a/apps/admin-x-settings/src/admin-x-ds/global/Table.tsx +++ b/apps/admin-x-settings/src/admin-x-ds/global/Table.tsx @@ -67,7 +67,7 @@ const Table: React.FC = ({children, borderTop, hint, hintSeparator, return ( <> -
+
{pageTitle && {pageTitle}} {!isLoading && diff --git a/apps/admin-x-settings/src/admin-x-ds/global/form/Form.tsx b/apps/admin-x-settings/src/admin-x-ds/global/form/Form.tsx index 0f273355fa..ce2b79d3a7 100644 --- a/apps/admin-x-settings/src/admin-x-ds/global/form/Form.tsx +++ b/apps/admin-x-settings/src/admin-x-ds/global/form/Form.tsx @@ -63,7 +63,7 @@ const Form: React.FC = ({ } let titleClasses = clsx( - grouped ? 'mb-2' : 'mb-3' + grouped ? 'mb-3' : 'mb-4' ); if (grouped || title) { diff --git a/apps/admin-x-settings/src/admin-x-ds/global/form/Toggle.tsx b/apps/admin-x-settings/src/admin-x-ds/global/form/Toggle.tsx index 626ff61218..41000964c3 100644 --- a/apps/admin-x-settings/src/admin-x-ds/global/form/Toggle.tsx +++ b/apps/admin-x-settings/src/admin-x-ds/global/form/Toggle.tsx @@ -89,7 +89,7 @@ const Toggle: React.FC = ({ type="checkbox" onChange={onChange} /> {label && -