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

Fix DIY theme change modal showing up in Sitegen Flow #537

Merged
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
7 changes: 7 additions & 0 deletions src/OnboardingSPA/components/StateHandlers/Design/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@
window.location.reload();
}
break;
case THEME_STATUS_NOT_ACTIVE:
if ( false === render ) {
// When render is false add this condition because
// handleRender() func does not run here and theme is not activated.
expediteInstall();
}
break;
default:
updateThemeStatus( themeStatus );
}
Expand All @@ -117,7 +124,7 @@
if ( storedThemeStatus === THEME_STATUS_INIT ) {
handleThemeStatus( storedThemeStatus );
}
}, [ storedThemeStatus ] );

Check warning on line 127 in src/OnboardingSPA/components/StateHandlers/Design/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

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

const installThemeManually = async () => {
updateThemeStatus( THEME_STATUS_INSTALLING );
Expand Down
2 changes: 1 addition & 1 deletion src/OnboardingSPA/steps/SiteGen/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
updateInitialize( true );
}, [] );

Check warning on line 81 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'setDrawerActiveView', 'setHeaderActiveView', 'setHideFooterNav', 'setIsHeaderEnabled', 'setSidebarActiveView', and 'updateInitialize'. Either include them or remove the dependency array

useEffect( () => {
if (
Expand All @@ -90,7 +90,7 @@
setIsHeaderNavigationEnabled( false );
}
prevSiteGenErrorStatus.current = siteGenErrorStatus;
}, [ siteGenErrorStatus ] );

Check warning on line 93 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

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

const loadHomepages = async () => {
setIsPreviewLoading( true );
Expand Down Expand Up @@ -151,7 +151,7 @@
loadHomepages();
loadGlobalStyles();
}
}, [ themeStatus ] );

Check warning on line 154 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

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

const handlePreview = ( slug, position ) => {
if ( ! ( slug in homepages ) ) {
Expand Down Expand Up @@ -307,7 +307,7 @@
const content = getContents();

return (
<DesignStateHandler>
<DesignStateHandler render={ false }>
<SiteGenStateHandler>
<CommonLayout className="nfd-onboarding-step--site-gen__preview">
<div className="nfd-onboarding-step--site-gen__preview__container">
Expand Down
Loading