Skip to content

Commit 3faf837

Browse files
ineaguclaude
andcommitted
feat(onboarding): tone down starter-sites listing banners
Two banners on the "Choose a design" step were too intrusive. 1. Remove the full-width "80+ new starter sites" promo notice (added in #465) and keep the social proof as a quiet subtitle under the heading: "Nearly 200 starter sites for every niche — fresh designs added regularly." Removes the OnboardingPromoNotice component + SCSS, the SiteList mount, the style import, and the dismiss AJAX handler / show-logic / localization in Admin.php, plus the e2e dismiss test. 2. Make the premium-upsell toast compact (smaller padding/font, capped width, smaller logo, no fixed 70px height) and sharpen the copy: "Unlock every premium template with Neve Business. Upgrade" (was "Unlock Access to all premium templates with Neve Business plan. Get Started."). Note: should_show_business_agency_promo_text() + the onboardingShowProNoticeText localization are now unused (they only varied the removed notice's text); left in place with their unit tests and can be pruned in a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrGf4K9upxDKhRPVCztoLs
1 parent fcdccdb commit 3faf837

8 files changed

Lines changed: 60 additions & 306 deletions

File tree

e2e-tests/specs/onboarding.spec.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -62,41 +62,6 @@ test.describe('Onboarding', () => {
6262
await expect(firstListedSiteCard.locator('.ss-title')).not.toBeEmpty();
6363
});
6464

65-
test('Onboarding promo notice can be dismissed and stays hidden after reload', async ({ page, admin }) => {
66-
await admin.visitAdminPage(ONBOARDING_URL);
67-
68-
const promoNotice = page.locator('.ob-onboarding-promo');
69-
await expect(promoNotice).toBeVisible();
70-
71-
// The client sends the dismiss action via FormData, which fetch encodes as
72-
// multipart/form-data. Inspect the raw body bytes so the predicate works
73-
// regardless of whether the encoding is multipart or url-encoded.
74-
const isDismissCall = (request) =>
75-
request.url().includes('admin-ajax.php') &&
76-
request.method() === 'POST' &&
77-
(request.postDataBuffer()?.toString('utf8') ?? '').includes(
78-
'dismiss_onboarding_promo_notice'
79-
);
80-
81-
const dismissRequest = page.waitForRequest(isDismissCall);
82-
const dismissResponse = page.waitForResponse((response) =>
83-
isDismissCall(response.request())
84-
);
85-
86-
await promoNotice.getByRole('button', { name: 'Dismiss notice' }).click();
87-
88-
const request = await dismissRequest;
89-
const response = await dismissResponse;
90-
expect(request.postDataBuffer()?.toString('utf8')).toContain(
91-
'dismiss_onboarding_promo_notice'
92-
);
93-
expect(response.ok()).toBeTruthy();
94-
95-
await expect(promoNotice).toBeHidden();
96-
await page.reload();
97-
await expect(promoNotice).toBeHidden();
98-
});
99-
10065
test('Site Import Customization Rendering', async ({ page, admin }) => {
10166
await admin.visitAdminPage(ONBOARDING_URL);
10267
await openFirstSiteAndWaitForData( page );

includes/Admin.php

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class Admin {
2626

2727
const TC_REMOVED_KEY = 'tiob_tc_removed';
2828
const TC_NEW_NOTICE_DISMISSED = 'tiob_new_tc_notice_dismissed';
29-
const ONBOARDING_PROMO_NOTICE_DISMISSED = 'tiob_onboarding_promo_notice_dismissed';
3029
const VISITED_LIBRARY_OPT = 'tiob_library_visited';
3130

3231
/**
@@ -89,7 +88,6 @@ public function init() {
8988
add_action( 'wp_ajax_tpc_get_logs', array( $this, 'external_get_logs' ) );
9089

9190
add_action( 'wp_ajax_dismiss_new_tc_notice', array( $this, 'dismiss_new_tc_notice' ) );
92-
add_action( 'wp_ajax_dismiss_onboarding_promo_notice', array( $this, 'dismiss_onboarding_promo_notice' ) );
9391

9492
$this->register_feedback_settings();
9593

@@ -163,52 +161,6 @@ public function dismiss_new_tc_notice() {
163161
$this->ensure_ajax_response( $response );
164162
}
165163

166-
/**
167-
* Dismiss onboarding promo notice.
168-
*
169-
* @return void
170-
*/
171-
public function dismiss_onboarding_promo_notice() {
172-
$response = array(
173-
'success' => false,
174-
'code' => 'ti__ob_not_allowed',
175-
'message' => 'Not allowed!',
176-
);
177-
178-
if ( ! isset( $_REQUEST['nonce'] ) ) {
179-
$this->ensure_ajax_response( $response );
180-
return;
181-
}
182-
183-
$nonce = sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) );
184-
185-
if ( ! wp_verify_nonce( $nonce, 'dismiss_onboarding_promo_notice' ) ) {
186-
$this->ensure_ajax_response( $response );
187-
return;
188-
}
189-
190-
if ( ! current_user_can( 'install_plugins' ) ) {
191-
$this->ensure_ajax_response( $response );
192-
return;
193-
}
194-
195-
$response['success'] = true;
196-
unset( $response['code'] );
197-
unset( $response['message'] );
198-
199-
update_option( self::ONBOARDING_PROMO_NOTICE_DISMISSED, 'yes' );
200-
$this->ensure_ajax_response( $response );
201-
}
202-
203-
/**
204-
* Decide if the onboarding promo notice should be shown.
205-
*
206-
* @return bool
207-
*/
208-
private function should_show_onboarding_promo_notice() {
209-
return get_option( self::ONBOARDING_PROMO_NOTICE_DISMISSED, 'no' ) !== 'yes';
210-
}
211-
212164
/**
213165
* Decide if the business/agency variant of the onboarding promo text should be shown.
214166
*
@@ -937,11 +889,6 @@ private function get_localization() {
937889
'ajaxURL' => esc_url( admin_url( 'admin-ajax.php' ) ),
938890
'nonce' => wp_create_nonce( 'dismiss_new_tc_notice' ),
939891
),
940-
'onboardingPromoNotice' => array(
941-
'show' => $this->should_show_onboarding_promo_notice(),
942-
'ajaxURL' => esc_url( admin_url( 'admin-ajax.php' ) ),
943-
'nonce' => wp_create_nonce( 'dismiss_onboarding_promo_notice' ),
944-
),
945892
'onboardingPluginCompatibility' => array(
946893
'hyve-lite' => is_php_version_compatible( '8.1' ),
947894
),

onboarding/src/Components/OnboardingPromoNotice.js

Lines changed: 0 additions & 96 deletions
This file was deleted.

onboarding/src/Components/Steps/SiteList.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Toast from '../Toast';
1111
import Filters from '../Filters';
1212
import Sites from '../Sites';
1313
import EditorSelector from '../EditorSelector';
14-
import OnboardingPromoNotice from '../OnboardingPromoNotice';
1514
import SVG from '../../utils/svg';
1615
import { get, track } from '../../utils/rest';
1716

@@ -41,7 +40,7 @@ const SiteList = ( {
4140

4241
const toastMessage = createInterpolateElement(
4342
__(
44-
'Unlock Access to all premium templates with Neve Business plan. <a></a>.',
43+
'Unlock every premium template with Neve Business. <a></a>',
4544
'templates-patterns-collection'
4645
),
4746
{
@@ -51,7 +50,7 @@ const SiteList = ( {
5150
target="_blank"
5251
rel="external noreferrer noopener"
5352
>
54-
{ __( 'Get Started', 'templates-patterns-collection' ) }
53+
{ __( 'Upgrade', 'templates-patterns-collection' ) }
5554
</a>
5655
),
5756
}
@@ -211,13 +210,23 @@ const SiteList = ( {
211210
<div className="ob-container">
212211
<div className="ob-container-inner">
213212
<div className="ob-title-wrap">
214-
<h1>
215-
{ __( 'Choose a design', 'templates-patterns-collection' ) }
216-
</h1>
213+
<div className="ob-title-text">
214+
<h1>
215+
{ __(
216+
'Choose a design',
217+
'templates-patterns-collection'
218+
) }
219+
</h1>
220+
<p className="ob-subtitle">
221+
{ __(
222+
'Nearly 200 starter sites for every niche — fresh designs added regularly.',
223+
'templates-patterns-collection'
224+
) }
225+
</p>
226+
</div>
217227
<EditorSelector />
218228
</div>
219229
<Filters />
220-
<OnboardingPromoNotice />
221230
{ ( personalizing || searching ) && (
222231
<div
223232
className="ob-ranking-loader"

onboarding/src/scss/_general.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,25 @@ iframe {
135135
display: flex;
136136
align-items: center;
137137
justify-content: space-between;
138+
gap: 16px;
139+
}
140+
141+
.ob-title-text {
142+
display: flex;
143+
flex-direction: column;
144+
gap: 4px;
145+
146+
h1 {
147+
margin: 0;
148+
}
149+
}
150+
151+
.ob-subtitle {
152+
margin: 0;
153+
color: $secondary-text;
154+
font-size: 14px;
155+
line-height: 20px;
156+
font-weight: 400;
138157
}
139158

140159
/**

0 commit comments

Comments
 (0)