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

Api integration preview home page #380

Merged
merged 85 commits into from
Jan 15, 2024

Conversation

ajayadav09
Copy link
Contributor

@ajayadav09 ajayadav09 commented Nov 30, 2023

home page preview:
Uploading Screenshot 2024-01-12 at 3.34.37 PM.png…

diDroid and others added 28 commits November 10, 2023 14:16
…bs/wp-module-onboarding into enhance/aio-design-previews

# Conflicts:
#	src/OnboardingSPA/styles/app.scss
…bs/wp-module-onboarding into api-integration-preview-home-page

# Conflicts:
#	src/OnboardingSPA/styles/_branding.scss
@ajayadav09 ajayadav09 added the WIP PR is a Work in Progress and not ready for review. label Nov 30, 2023
@ajayadav09 ajayadav09 self-assigned this Nov 30, 2023
@arunshenoy99 arunshenoy99 marked this pull request as ready for review January 2, 2024 06:08
@officiallygod officiallygod changed the base branch from enhance/ai-onboarding to demo/sitegen-mvp January 3, 2024 07:44
@officiallygod officiallygod changed the base branch from demo/sitegen-mvp to enhance/ai-onboarding January 3, 2024 07:45
Copy link
Member

@officiallygod officiallygod left a comment

Choose a reason for hiding this comment

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

  1. Let's use Options::get_option_name() whenever possible
  2. Let's Format the code correctly as rn the PHP Lint check has issues.

build/1.11.8/images/ai_bg_low.d8292556.png Outdated Show resolved Hide resolved
build/1.11.8/images/toggle-light-mode.8d7afd07.png Outdated Show resolved Hide resolved
includes/RestApi/SiteGenController.php Outdated Show resolved Hide resolved
includes/RestApi/SiteGenController.php Outdated Show resolved Hide resolved
includes/RestApi/SiteGenController.php Outdated Show resolved Hide resolved
Comment on lines 245 to 246
$target_audience = get_option('nfd-ai-site-gen-targetaudience');
$content_style = get_option('nfd-ai-site-gen-contenttones');
Copy link
Member

Choose a reason for hiding this comment

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

I am pretty skeptical about this though.

includes/RestApi/SiteGenController.php Outdated Show resolved Hide resolved
src/OnboardingSPA/components/Header/stylesheet.scss Outdated Show resolved Hide resolved
Comment on lines 16 to +19
const { headers, headerActiveView, isHeaderEnabled, currentStep } =
useSelect( ( select ) => {
return {
currentStep: select( nfdOnboardingStore ).getCurrentStep(),
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can keep it in the same order i.e. var names and functions.

Comment on lines 208 to 216
if ( ! $target_audience || ! $content_style ) {
return new \WP_Error(
'nfd_onboarding_error',
__( 'Required data is missing.', 'wp-module-onboarding' ),
array(
'status' => 400,
)
);
}
Copy link
Member

Choose a reason for hiding this comment

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

What if we add a code to send Error from our Service and catch it here, cause I believe here what if it gives an error from Press 3 API, that won't be null but still have an error and going forward will break things.

Comment on lines 244 to 255
$target_audience = SiteGenService::instantiate_site_meta( $site_info, 'targetaudience', true );
$content_style = SiteGenService::instantiate_site_meta( $site_info, 'contenttones', true );

if ( ! $target_audience || ! $content_style ) {
return new \WP_Error(
'nfd_onboarding_error',
__( 'Required data is missing.', 'wp-module-onboarding' ),
array(
'status' => 400,
)
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

Comment on lines +61 to +63
const regenerate = () => {
// alert( 'regenerate' );
};
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be like this?

@officiallygod officiallygod added this to the AI Onboarding v1.0 milestone Jan 11, 2024
Copy link
Member

@officiallygod officiallygod left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@arunshenoy99 arunshenoy99 merged commit 105a327 into enhance/ai-onboarding Jan 15, 2024
@arunshenoy99 arunshenoy99 deleted the api-integration-preview-home-page branch January 15, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Review The PR is in Code Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants