Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Onboarding to 1.11.1 #323

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function nfd_wp_module_onboarding_register() {

// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.11.0' );
define( 'NFD_ONBOARDING_VERSION', '1.11.1' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => 'f7c5419dad4a9f89da9f');
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => '1a96ab4bf73f5b59efaa');
File renamed without changes.
8 changes: 4 additions & 4 deletions build/1.11.0/onboarding.js → build/1.11.1/onboarding.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newfold-labs/wp-module-onboarding",
"version": "1.11.0",
"version": "1.11.1",
"description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.",
"license": "GPL-2.0-or-later",
"private": true,
Expand Down
9 changes: 7 additions & 2 deletions src/OnboardingSPA/components/StateHandlers/Flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import { getQueryParam, removeQueryParam } from '../../../utils';
import { commerce } from '../../../chapters/commerce';
import EcommerceStepLoader from '../../Loaders/Step/Ecommerce';
import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics';

const FlowStateHandler = ( { children } ) => {
const location = useLocation();
Expand Down Expand Up @@ -70,16 +71,20 @@
if ( retries >= MAX_RETRIES_FLOW_SWITCH ) {
return setNewFlow( false );
}
const response = switchFlow( flow );
const response = await switchFlow( flow );
if ( response?.error ) {
retries = retries + 1;
return handleCommerceFlow( flow, retries );
}
await HiiveAnalytics.dispatchEvents();

// TODO: Remove code below once Chapter Prioritization is enabled.
const firstEcommerceStep = commerce.steps[ 0 ];
const fragment = getFragment( window.location.href );
const redirect = removeQueryParam( window.location.href, 'flow' ).replace( fragment, '' );
const redirect = removeQueryParam(
window.location.href,
'flow'
).replace( fragment, '' );
window.location.replace( `${ redirect }#${ firstEcommerceStep.path }` );
window.location.reload();
};
Expand Down Expand Up @@ -174,11 +179,11 @@
if ( false !== brandConfig?.prioritization ) {
return prioritizeFlow();
}
}, [ experienceLevel, topPriority ] );

Check warning on line 182 in src/OnboardingSPA/components/StateHandlers/Flow/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'brandConfig?.prioritization' and 'prioritizeFlow'. Either include them or remove the dependency array

useEffect( () => {
trackChapters();
}, [ currentStep ] );

Check warning on line 186 in src/OnboardingSPA/components/StateHandlers/Flow/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'trackChapters'. Either include it or remove the dependency array

const disableNavigation = () => {
setIsDrawerOpened( false );
Expand All @@ -195,7 +200,7 @@
switchToNewFlow( flow );
window.nfdOnboarding.newFlow = undefined;
}
}, [ location.pathname ] );

Check warning on line 203 in src/OnboardingSPA/components/StateHandlers/Flow/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'disableNavigation' and 'switchToNewFlow'. Either include them or remove the dependency array

// TODO: Remove handleRender and replace with only children once Chapter Prioritization is enabled.
const handleRender = () => {
Expand Down