Skip to content

Commit 386e100

Browse files
committed
fix: qa issues
1 parent 3f298dc commit 386e100

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

assets/apps/dashboard/src/Components/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ const App = () => {
4545
<Container className="flex flex-col lg:flex-row gap-6 h-full grow">
4646
<div className="grow">{tabs[currentTab].render(setTab)}</div>
4747

48-
{!['starter-sites', 'settings', 'launch-progress'].includes(currentTab) && (
48+
{!['starter-sites', 'settings', 'launch-progress'].includes(
49+
currentTab
50+
) && (
4951
<TransitionWrapper className="shrink-0 lg:w-[435px]">
5052
<Sidebar />
5153
</TransitionWrapper>

assets/apps/dashboard/src/Components/Content/LaunchProgress.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ const initializeStepState = (
4141
});
4242
};
4343

44+
const { plugins } = neveDash;
45+
46+
const activeTPC =
47+
plugins['templates-patterns-collection'] &&
48+
plugins['templates-patterns-collection'].cta === 'deactivate';
49+
4450
const LaunchProgress = () => {
4551
// Get checks from neveDash
4652
const checks = neveDash.launchProgress || {};
@@ -131,7 +137,11 @@ const LaunchProgress = () => {
131137
</div>
132138
<Button
133139
isPrimary
134-
href={neveDash.tpcOnboardingURL}
140+
href={
141+
activeTPC
142+
? neveDash.tpcOnboardingURL
143+
: neveDash.launchProgressUrls.starterSites
144+
}
135145
className="shrink-0 whitespace-nowrap"
136146
>
137147
{__('Starter Sites', 'neve')}
@@ -439,7 +449,12 @@ const contentSteps = [
439449
completed: false,
440450
},
441451
{
442-
title: __('Add About & Contact Pages', 'neve'),
452+
title:
453+
__('About', 'neve') +
454+
' & ' +
455+
__('Contact', 'neve') +
456+
' ' +
457+
__('Pages', 'neve'),
443458
description: __(
444459
'Create essential pages so visitors can learn about you and get in touch',
445460
'neve'
@@ -448,7 +463,7 @@ const contentSteps = [
448463
completed: false,
449464
},
450465
{
451-
title: __('Create Navigation Menu', 'neve'),
466+
title: __('Navigation Menu', 'neve'),
452467
description: __(
453468
'Make it easy for visitors to find their way around your website',
454469
'neve'
@@ -457,7 +472,7 @@ const contentSteps = [
457472
completed: false,
458473
},
459474
{
460-
title: __('Configure Footer', 'neve'),
475+
title: __('Footer', 'neve'),
461476
description: __(
462477
'Add copyright info, social links, and contact details to your footer',
463478
'neve'

inc/admin/dashboard/main.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,13 +410,26 @@ private function get_localization() {
410410
'savedProgress' => $launch_progress_data['savedProgress'],
411411
];
412412

413+
$screen = get_current_screen();
414+
if ( ! isset( $screen->id ) ) {
415+
return $data;
416+
}
417+
418+
$theme = $this->theme_args;
419+
$theme_page = ! empty( $theme['template'] ) ? $theme['template'] . '-welcome' : $theme['slug'] . '-welcome';
420+
421+
// Check if front page exists
422+
$page_on_front = get_option( 'page_on_front' );
423+
$homepage_url = $page_on_front ? admin_url( 'post.php?post=' . $page_on_front . '&action=edit' ) : admin_url( 'edit.php?post_type=page' );
424+
413425
// Launch Progress step URLs
414426
$data['launchProgressUrls'] = [
427+
'starterSites' => admin_url( 'admin.php?page=' . $theme_page . '#starter-sites' ),
415428
'siteIdentity' => add_query_arg( [ 'autofocus[section]' => 'title_tagline' ], admin_url( 'customize.php' ) ),
416429
'logo' => add_query_arg( [ 'autofocus[control]' => 'custom_logo' ], admin_url( 'customize.php' ) ),
417430
'colors' => add_query_arg( [ 'autofocus[section]' => 'neve_colors_background_section' ], admin_url( 'customize.php' ) ),
418431
'favicon' => add_query_arg( [ 'autofocus[control]' => 'site_icon' ], admin_url( 'customize.php' ) ),
419-
'homepage' => admin_url( 'post.php?post=' . get_option( 'page_on_front' ) . '&action=edit' ),
432+
'homepage' => $homepage_url,
420433
'pages' => admin_url( 'edit.php?post_type=page' ),
421434
'menus' => admin_url( 'nav-menus.php' ),
422435
'footer' => add_query_arg( [ 'autofocus[panel]' => 'hfg_footer' ], admin_url( 'customize.php' ) ),

inc/core/admin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public function save_launch_progress( $request ) {
509509
return new \WP_REST_Response(
510510
[
511511
'success' => false,
512-
'message' => __( 'Invalid progress data', 'neve' ),
512+
'message' => 'Invalid progress data',
513513
],
514514
400
515515
);
@@ -522,7 +522,7 @@ public function save_launch_progress( $request ) {
522522
return new \WP_REST_Response(
523523
[
524524
'success' => false,
525-
'message' => __( 'Invalid progress structure', 'neve' ),
525+
'message' => 'Invalid progress structure',
526526
],
527527
400
528528
);
@@ -534,7 +534,7 @@ public function save_launch_progress( $request ) {
534534
return new \WP_REST_Response(
535535
[
536536
'success' => false,
537-
'message' => __( 'Progress values must be boolean', 'neve' ),
537+
'message' => 'Progress values must be boolean',
538538
],
539539
400
540540
);
@@ -548,7 +548,7 @@ public function save_launch_progress( $request ) {
548548
return new \WP_REST_Response(
549549
[
550550
'success' => true,
551-
'message' => __( 'Progress saved', 'neve' ),
551+
'message' => 'Progress saved',
552552
],
553553
200
554554
);

0 commit comments

Comments
 (0)