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

Migrate screen via the site import link #543

Merged
merged 45 commits into from
May 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4a06bdf
migration screen added
ramyakrishnai Apr 4, 2024
54481f1
add as a default route
ramyakrishnai Apr 4, 2024
30ce804
Merge pull request #535 from ramyakrishnai/migration-screens
ramyakrishnai Apr 8, 2024
2d353c5
redirecting to the migration white labeled screen
ramyakrishnai Apr 8, 2024
3945f65
formatting and lint
ajayadav09 Apr 15, 2024
dce5968
responsiveness changes
ajayadav09 Apr 15, 2024
68a76b3
reused prop
ajayadav09 Apr 15, 2024
666a9cc
Error status
ajayadav09 Apr 15, 2024
1856b81
added error step
ajayadav09 Apr 15, 2024
875abf6
error step changes
ajayadav09 Apr 16, 2024
e78009a
button fix
ajayadav09 Apr 16, 2024
90411f9
Merge branch 'trunk' into migrate-screen
ajayadav09 Apr 16, 2024
91df497
merging trunk
ajayadav09 Apr 16, 2024
598dc67
removed unnecessary code
ajayadav09 Apr 16, 2024
e8f908c
cursor pointer
ajayadav09 Apr 17, 2024
d1232ae
fixed lint
ajayadav09 Apr 17, 2024
4fc8198
fix style lint
ajayadav09 Apr 17, 2024
c151a65
applied brand check
ajayadav09 Apr 17, 2024
f64b484
checking via a flag from onboarding data
ajayadav09 Apr 18, 2024
4b85c36
added can migrate acess capability check
ajayadav09 Apr 23, 2024
ee4552a
fixed typo
ajayadav09 Apr 25, 2024
a6f7275
remove import flag
ajayadav09 Apr 25, 2024
16ff638
removed isimportenabled
ajayadav09 Apr 25, 2024
be46697
Update src/OnboardingSPA/steps/SiteGen/Migration/index.js
ajayadav09 Apr 25, 2024
518a673
rename step
ajayadav09 Apr 25, 2024
8d06a7e
Update src/OnboardingSPA/styles/app.scss
ajayadav09 Apr 26, 2024
542fc55
fixes
ajayadav09 Apr 26, 2024
f5dbbeb
fixed step check
ajayadav09 Apr 26, 2024
da42d60
fixed error status check
ajayadav09 Apr 26, 2024
4317f0e
added steps
ajayadav09 Apr 26, 2024
3a3fdfe
added step on click and made common error state
ajayadav09 Apr 29, 2024
02cd9d1
remove step
ajayadav09 Apr 29, 2024
69b4497
reused functions
ajayadav09 Apr 29, 2024
7989235
added routes dynamically
ajayadav09 Apr 29, 2024
3e75c7f
fixed route and step
ajayadav09 Apr 29, 2024
986f3ad
reordered and categorized import statements
ajayadav09 Apr 29, 2024
c05ed39
cleaned up
ajayadav09 Apr 29, 2024
9fcfd77
Merge branch 'trunk' into migrate-screen
ajayadav09 Apr 29, 2024
7b7ddbd
added module migration dependency
ajayadav09 Apr 30, 2024
3d0aa3b
added canMigrateSIte check on the Migration step
ajayadav09 Apr 30, 2024
237bed1
changed text to include current Brand name
ajayadav09 May 2, 2024
76f16ff
fixed lint
ajayadav09 May 2, 2024
060d6ed
Merge branch 'trunk' into migrate-screen
ajayadav09 May 2, 2024
27512bf
Merge branch 'trunk' into migrate-screen
ajayadav09 May 2, 2024
107ad57
updated composer with migration dependency
ajayadav09 May 3, 2024
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
Prev Previous commit
Next Next commit
fixed typo
ajayadav09 committed Apr 25, 2024
commit ee4552a547b416534ef3c0b82f19f4f737e9af79
8 changes: 4 additions & 4 deletions src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
@@ -34,14 +34,14 @@

const TheFork = () => {
const [ experimentVersion, setExperimentVersion ] = useState();
const { currentData, migrationUrl, isImportEnabled, canMigrateSites } =
const { currentData, migrationUrl, isImportEnabled, canMigrateSite } =
useSelect( ( select ) => {
return {
currentData:
select( nfdOnboardingStore ).getCurrentOnboardingData(),
migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(),
isImportEnabled: select( nfdOnboardingStore ).isImportEnabled(),
canMigrateSites: select( nfdOnboardingStore ).canMigrateSites(),
canMigrateSite: select( nfdOnboardingStore ).canMigrateSite(),
};
} );

@@ -133,7 +133,7 @@
);
};

console.log("can migrate sites", canMigrateSites );
console.log("can migrate sites", canMigrateSite );

Check failure on line 136 in src/OnboardingSPA/steps/TheFork/index.js

GitHub Actions / Run Lint Checks

Unexpected console statement

Check failure on line 136 in src/OnboardingSPA/steps/TheFork/index.js

GitHub Actions / Run Lint Checks

Replace `"can·migrate·sites"` with `·'can·migrate·sites'`
return (
<CommonLayout
isCentered
@@ -151,7 +151,7 @@
/>
<br />
<br />
{ isImportEnabled && canMigrateSites ? (
{ isImportEnabled && canMigrateSite ? (
<div
className="nfd-onboarding-step--site-gen__fork__importsite"
onClick={ () => {
6 changes: 3 additions & 3 deletions src/OnboardingSPA/store/selectors.js
Original file line number Diff line number Diff line change
@@ -377,11 +377,11 @@ export function isImportEnabled( state ) {
* Checks if the site has migration access.
*
* @param {*} state
* @return {boolean} canMigrateSites
* @return {boolean} canMigrateSite
*/
export function canMigrateSites( state ) {
export function canMigrateSite( state ) {
const migrationInfo = state.runtime.currentBrand.migrationInfo;
return migrationInfo?.canMigrateSites;
return migrationInfo?.canMigrateSite;
}

/**

Unchanged files with check annotations Beta

currentRoute: select( nfdOnboardingStore ).getCurrentStepPath(),
};
},
[ location.pathname ]

Check warning on line 107 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js

GitHub Actions / Run Lint Checks

React Hook useSelect has an unnecessary dependency: 'location.pathname'. Either exclude it or remove the dependency array
);
const [ isRequestPlaced, setIsRequestPlaced ] = useState( false );
useEffect( () => {
trackChapters();
}, [ currentStep ] );

Check warning on line 376 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'trackChapters'. Either include it or remove the dependency array
const prioritizeFlow = () => {
const currentFlow = window.nfdOnboarding.currentFlow;
initializeSettings();
setInterval( cronTrigger, 45000 );
}
}, [ initialize ] );

Check warning on line 417 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'pluginInstallHash'. Either include it or remove the dependency array
useEffect( () => {
if ( false !== brandConfig?.prioritization ) {
return prioritizeFlow();
}
}, [ experienceLevel, topPriority ] );

Check warning on line 423 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'brandConfig?.prioritization' and 'prioritizeFlow'. Either include them or remove the dependency array
useEffect( () => {
document.body.classList.add( `nfd-brand-${ newfoldBrand }` );
syncStoreToDB();
handlePreviousStepTracking();
handleConditionalDesignStepsRoutes();
}, [ location.pathname, onboardingFlow ] );

Check warning on line 433 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'handleConditionalDesignStepsRoutes', 'handlePreviousStepTracking', and 'syncStoreToDB'. Either include them or remove the dependency array
const isForkStep =
currentStep === stepTheFork ||
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
setFooterActiveView( FOOTER_SITEGEN );
}, [] );

Check warning on line 50 in src/OnboardingSPA/steps/SiteGen/Migration/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'setDrawerActiveView', 'setFooterActiveView', 'setHeaderActiveView', 'setHideFooterNav', 'setIsHeaderEnabled', 'setIsHeaderNavigationEnabled', and 'setSidebarActiveView'. Either include them or remove the dependency array
useEffect( () => {
if ( ! siteGenErrorStatus ) {
loadData();
}
}, [ siteGenErrorStatus ] );

Check warning on line 56 in src/OnboardingSPA/steps/SiteGen/Migration/index.js

GitHub Actions / Run Lint Checks

React Hook useEffect has a missing dependency: 'loadData'. Either include it or remove the dependency array
const content = getContents();
return (