From 343535116cb73908737906e3701054fd3cb0ae1f Mon Sep 17 00:00:00 2001 From: Jono M Date: Mon, 18 Sep 2023 14:51:59 +0100 Subject: [PATCH] Updated select to use react-select (#18164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Product/issues/3832 --- ### πŸ€– Generated by Copilot at adffb67 This file updates the global form select component to use a custom `ReactSelect` component with better performance and style. --- .../chrome/DesktopChromeHeader.stories.tsx | 7 +- .../admin-x-ds/global/form/MultiSelect.tsx | 2 +- .../admin-x-ds/global/form/Select.stories.tsx | 2 +- .../src/admin-x-ds/global/form/Select.tsx | 143 +++++++++++------- .../global/form/TextField.stories.tsx | 3 +- .../global/form/URLSelect.stories.tsx | 28 ---- .../src/admin-x-ds/global/form/URLSelect.tsx | 25 --- .../admin-x-ds/global/modal/PreviewModal.tsx | 2 +- .../settings/email/DefaultRecipients.tsx | 9 +- .../src/components/settings/email/Mailgun.tsx | 5 +- .../components/settings/general/TimeZone.tsx | 4 +- .../components/settings/membership/Access.tsx | 66 ++++++-- .../settings/membership/TipsOrDonations.tsx | 5 +- .../membership/portal/LookAndFeel.tsx | 2 +- .../membership/portal/PortalLinks.tsx | 4 +- .../membership/tiers/TierDetailModal.tsx | 3 +- .../site/designAndBranding/ThemeSettings.tsx | 2 +- .../e2e/advanced/integrations/custom.test.ts | 6 +- .../test/e2e/email/defaultRecipients.test.ts | 16 +- .../test/e2e/email/newsletters.test.ts | 4 +- .../test/e2e/general/timeZone.test.ts | 10 +- .../test/e2e/membership/access.test.ts | 14 +- .../test/e2e/site/design.test.ts | 4 +- apps/admin-x-settings/test/utils/e2e.ts | 7 +- 24 files changed, 203 insertions(+), 170 deletions(-) delete mode 100644 apps/admin-x-settings/src/admin-x-ds/global/form/URLSelect.stories.tsx delete mode 100644 apps/admin-x-settings/src/admin-x-ds/global/form/URLSelect.tsx diff --git a/apps/admin-x-settings/src/admin-x-ds/global/chrome/DesktopChromeHeader.stories.tsx b/apps/admin-x-settings/src/admin-x-ds/global/chrome/DesktopChromeHeader.stories.tsx index ce9fd80de7..517da15bd6 100644 --- a/apps/admin-x-settings/src/admin-x-ds/global/chrome/DesktopChromeHeader.stories.tsx +++ b/apps/admin-x-settings/src/admin-x-ds/global/chrome/DesktopChromeHeader.stories.tsx @@ -3,8 +3,7 @@ import type {Meta, StoryObj} from '@storybook/react'; import Button from '../Button'; import ButtonGroup from '../ButtonGroup'; import DesktopChromeHeader from './DesktopChromeHeader'; -import URLSelect from '../form/URLSelect'; -import {SelectOption} from '../form/Select'; +import Select, {SelectOption} from '../form/Select'; const meta = { title: 'Global / Chrome / Desktop Header', @@ -54,7 +53,7 @@ const selectOptions: SelectOption[] = [ export const CustomToolbar: Story = { args: { toolbarLeft: