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

Save continue dim UI #462

Merged
merged 14 commits into from
Feb 21, 2024
12 changes: 12 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Editor/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,18 @@ const StepSiteGenEditorHeader = () => {
}
}, [ currentData ] );

useEffect( () => {
if ( isSaving ) {
document.body.classList.add( 'editor-actions-disabled' );
} else {
document.body.classList.remove( 'editor-actions-disabled' );
}

return () => {
document.body.classList.remove( 'editor-actions-disabled' );
};
}, [ isSaving ] );

return (
<>
<Fill name={ `${ HEADER_SITEGEN }/${ HEADER_START }` }>
Expand Down
12 changes: 12 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Editor/Header/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,15 @@
}
}
}

body {

&.editor-actions-disabled {
pointer-events: none;
opacity: 0.7;
arunshenoy99 marked this conversation as resolved.
Show resolved Hide resolved

.nfd-onboarding-header--sitegen__editor__end__save-button {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leverage SASS capabilities to break down --'s and __'s.

pointer-events: all;
}
}
}
Loading