From ba9b695626a925ec4cca4a1aa7c8c466a5c2a430 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Tue, 13 Feb 2024 11:16:01 +0100 Subject: [PATCH] Update "Customize" link on Setup screen (#19686) refs. https://linear.app/tryghost/issue/DES-113/clicking-customize-design-on-setup-page-lands-you-on-top-level On the setup screen 60% of people choose "Customize your site" which ATM just take people to the top level Settings screen. This is very confusing as with all the settings people don't know where to click to actually get to customizing their site. This PR fixes it by showing the design settings when clicking on "Customize your site" and to the Dashboard after closing it. --- .../components/settings/site/DesignModal.tsx | 16 ++++++++-- .../components/settings/site/ThemeModal.tsx | 29 +++++++++++++++---- ghost/admin/app/templates/setup/done.hbs | 4 +-- 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/site/DesignModal.tsx b/apps/admin-x-settings/src/components/settings/site/DesignModal.tsx index 3ff5ed8aaa..3449dc87aa 100644 --- a/apps/admin-x-settings/src/components/settings/site/DesignModal.tsx +++ b/apps/admin-x-settings/src/components/settings/site/DesignModal.tsx @@ -2,6 +2,7 @@ import BrandSettings, {BrandSettingValues} from './designAndBranding/BrandSettin import React, {useEffect, useState} from 'react'; import ThemePreview from './designAndBranding/ThemePreview'; import ThemeSettings from './designAndBranding/ThemeSettings'; +import useQueryParams from '../../../hooks/useQueryParams'; import {CustomThemeSetting, useBrowseCustomThemeSettings, useEditCustomThemeSettings} from '@tryghost/admin-x-framework/api/customThemeSettings'; import {Icon, PreviewModalContent, StickyFooter, Tab, TabView} from '@tryghost/admin-x-design-system'; import {Setting, SettingValue, getSettingValues, useEditSettings} from '@tryghost/admin-x-framework/api/settings'; @@ -30,6 +31,7 @@ const Sidebar: React.FC<{ const {updateRoute} = useRouting(); const [selectedTab, setSelectedTab] = useState('brand'); const {data: {themes} = {}} = useBrowseThemes(); + const refParam = useQueryParams().getParam('ref'); const activeTheme = themes?.find(theme => theme.active); @@ -60,7 +62,11 @@ const Sidebar: React.FC<{