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

Streamline onboarding: Move FAQs to the bottom of pages #2531

Merged
merged 15 commits into from
Sep 1, 2024

Conversation

asvinb
Copy link
Collaborator

@asvinb asvinb commented Aug 15, 2024

Changes proposed in this Pull Request:

Closes #2488

  • Add new StepContentActions component which replaces StepContentFooter.
  • Add a new StepContentFooter component which uses the existing Section and VerticalGapLayout components.
  • Added the new xlarge size to VerticalGapLayout that uses the --large-gap CSS property for spacing.

Screenshots:

Onboarding flow:

  • image
  • image

Editing a paid campaign
image

Optimizing your campaign
image

Detailed test instructions:

  • Go through the onboarding flow.
  • The FAQ section should be after the CTA for the following pages:
    • During the onboarding process, the first step ("Set up your accounts") and fourth step ("Create a campaign")
    • When editing a paid campaign (Go to the dashboard and "Edit" any paid campaign which has been previously created)
    • When optimizing a paid campaign.
      • Click on the "Add paid campaign" from the dashboard.
      • Fill in the form in the first step and go to the next one (Optimize your campaign) to see the FAQ.
  • The spacing between the CTA and the FAQ panel should be 40px which is the value of the --large-gap CSS property as per the AC.

Additional details:

On the first step of the onboarding process, there is extra space between the CTA and the section above because of the long text as per the screenshot:
image

Changelog entry

Tweak - Move FAQs to the bottom of pages.

@asvinb asvinb changed the title 2488: Move FAQs panel after CTA 2488: Move FAQs panel after CTAs Aug 15, 2024
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 21.05263% with 15 lines in your changes missing coverage. Please review.

Project coverage is 63.8%. Comparing base (5af0314) to head (513c6b9).
Report is 66 commits behind head on feature/2458-streamline-onboarding.

Files with missing lines Patch % Lines
...src/components/paid-ads/asset-group/asset-group.js 0.0% 12 Missing ⚠️
...c/components/stepper/step-content-actions/index.js 33.3% 1 Missing and 1 partial ⚠️
.../src/components/paid-ads/asset-group/faqs-panel.js 50.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                         Coverage Diff                          @@
##           feature/2458-streamline-onboarding   #2531     +/-   ##
====================================================================
- Coverage                                63.8%   63.8%   -0.0%     
====================================================================
  Files                                     326     327      +1     
  Lines                                    5086    5090      +4     
  Branches                                 1229    1232      +3     
====================================================================
+ Hits                                     3247    3248      +1     
- Misses                                   1672    1674      +2     
- Partials                                  167     168      +1     
Flag Coverage Δ
js-unit-tests 63.8% <21.1%> (-<0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../free-listings/setup-free-listings/form-content.js 8.3% <ø> (ø)
js/src/components/paid-ads/ads-campaign.js 0.0% <ø> (ø)
js/src/components/paid-ads/faqs-panel.js 66.7% <100.0%> (ø)
...rc/components/stepper/step-content-footer/index.js 50.0% <100.0%> (+16.7%) ⬆️
js/src/components/vertical-gap-layout/index.js 100.0% <ø> (ø)
.../src/components/paid-ads/asset-group/faqs-panel.js 66.7% <50.0%> (ø)
...c/components/stepper/step-content-actions/index.js 33.3% <33.3%> (ø)
...src/components/paid-ads/asset-group/asset-group.js 4.7% <0.0%> (ø)

... and 2 files with indirect coverage changes

Copy link
Collaborator

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

Left a few suggestions. Additionally, regarding your observation about the excessive space due to the MC card text, there is also extra space when the card is expanded to show the "Select an existing account" dropdown.

image

It looks like these styles that used to ensure that there was space between this card and the FAQ panel can be removed. That won't totally solve the issue you noted, but will help in some cases.

@@ -47,15 +47,15 @@ const FormContent = ( {
<ConditionalSection show={ shouldDisplayTaxRate }>
<TaxRate />
</ConditionalSection>
<StepContentFooter>
<StepContentActions>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that you've separated the StepContentActions from the StepContentFooter, I think it would be good to be consistent about wrapping StepContentActions in a StepContentsFooter component everywhere it's used, rather than just when it's in a Section with a FaqPanel. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Handled in 0a1f579

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree @joemcgill 👍

<FaqsPanel context="campaign-management" faqItems={ faqItems } />
</Section>
);
return <FaqsPanel context="campaign-management" faqItems={ faqItems } />;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that you're removing the Section component from this and the paid-ads/faqs-section.js I think it would make more sense to rename them as well. Perhaps using an even a more specific name like AssetGroupFaqsPanel and PaidAdsFaqsPanel, respectively so their not confused with the primitive FaqsPanel component they consume.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Handled in 0a1f579

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking of that! 👍

@joemcgill
Copy link
Collaborator

@asvinb I made some updates to this PR, per my feedback. Would you mind giving it a look before sending to QA?

@asvinb
Copy link
Collaborator Author

asvinb commented Aug 21, 2024

All good @joemcgill !

@joemcgill joemcgill dismissed their stale review August 21, 2024 15:12

Changes requested have been addressed, but I worked on that code so am going to defer approving.

@ankitguptaindia
Copy link
Member

QA/Test Report-

Testing Environment -

  • WordPress: 6.6.1
  • Theme active on store: Storefront Version: 4.6.0
  • WooCommerce - Version 9.2.1
  • PHP: 8.3
  • Web Server: Nginx
  • Browser: Chrome - Version 127
  • OS: macOS Sonoma 14.6.1

Steps to Test- Please follow the steps mentioned in PR description and watch below attached screencast for all screens.

Test Results - Tested the changes in the below mentioned browsers and all screens are showing the FAQ section below of CTA button.

  • Chrome
  • Safari
  • Mobile layout.

Functional Demo / Screencast -

Recording.799.mp4

Next Step- Ready to Code Review(Woo)

Plugin file with this fix-specific branch: Branch: feature/2488-move-faq
google-listings-and-ads.zip

@ankitguptaindia ankitguptaindia self-requested a review August 22, 2024 09:13
@joemcgill joemcgill requested a review from eason9487 August 22, 2024 12:56
Copy link
Collaborator

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

Marking approved just to avoid confusion.

@joemcgill joemcgill changed the base branch from develop to feature/2458-streamline-onboarding August 22, 2024 14:01
@joemcgill
Copy link
Collaborator

@eason9487 this one is ready for your review

@eason9487 eason9487 added the changelog: tweak Small change, that isn't actually very important. label Aug 26, 2024
Copy link
Contributor

@jorgemd24 jorgemd24 left a comment

Choose a reason for hiding this comment

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

Hi @asvinb! Thanks for working on this, I left a comment related to that FAQ section is not shown in the step 4 of the onboarding.

image

Regards that big gap on the step 1, from my opinion looks a bit odd to see so much space and the button looks a bit lost in the screen, not sure what would be better here but maybe we can ask for help from a designer to improve this part and we could work on this in a follow-up PR. WDYT?

image

</StepContentFooter>
</StepContent>
);
}

<PaidAdsFaqsPanel />;
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this should be placed inside StepContentFooter component, otherwise the FAQ will be not displayed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching that @jorgemd24 . PR Updated!

@asvinb
Copy link
Collaborator Author

asvinb commented Aug 29, 2024

@jorgemd24 @joemcgill One potential solution for the excessive spacing is moving the CTA and FAQ panel for the accounts setup step within the gla-google-mc-account-section section.

<Section
	className="gla-google-mc-account-section"
	description={ <GoogleMCDisclaimer /> }
	disabledLeft={ ! isGMCPreconditionReady }
>
	<GoogleMCAccountCard />

	<VerticalGapLayout size="xlarge">
		<StepContentActions>
			<AppButton
				isPrimary
				disabled={ isContinueButtonDisabled }
				onClick={ onContinue }
			>
				{ __( 'Continue', 'google-listings-and-ads' ) }
			</AppButton>
		</StepContentActions>
		<Faqs />
	</VerticalGapLayout>
</Section>

It'll look like this:
image

The only downside is that we are not using the StepContentActions component for this particular step.
What do you think?

Copy link
Contributor

@jorgemd24 jorgemd24 left a comment

Choose a reason for hiding this comment

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

Thanks for the adjustments, LGTM 👍

One potential solution for the excessive spacing is moving the CTA and FAQ panel for the accounts setup step within the gla-google-mc-account-section section.

Visually, I think it looks better this way. We could also just move the CTA button and keep the FAQ in the footer.

			<Section
				className="gla-google-mc-account-section"
				description={ <GoogleMCDisclaimer /> }
				disabledLeft={ ! isGMCPreconditionReady }
			>
				<GoogleMCAccountCard />
				<VerticalGapLayout size="xlarge">
					<StepContentActions>
						<AppButton
							isPrimary
							disabled={ isContinueButtonDisabled }
							onClick={ onContinue }
						>
							{ __( 'Continue', 'google-listings-and-ads' ) }
						</AppButton>
					</StepContentActions>
				</VerticalGapLayout>
			</Section>
			<StepContentFooter>
				<Faqs />
			</StepContentFooter>

I'm approving this PR so we can move forward, and we can discuss this in a separate issue or PR so we don't block this PR.

@joemcgill
Copy link
Collaborator

joemcgill commented Sep 1, 2024

Thanks @asvinb the updates in

One potential solution for the excessive spacing is moving the CTA and FAQ panel for the accounts setup step within the gla-google-mc-account-section section.

Given that we're reworking the account cards in #2509, let's hold off on making any additional changes. If we decide that we want to ship this FAQ panel change sooner, than doing something like @jorgemd24 suggests in #2531 (review) could be a good short-term solution.

I'm going to go ahead and merge this into the feature branch for now. Thanks all!

@joemcgill joemcgill merged commit 1030b8d into feature/2458-streamline-onboarding Sep 1, 2024
7 checks passed
@joemcgill joemcgill deleted the feature/2488-move-faq branch September 1, 2024 18:22
@eason9487 eason9487 changed the title 2488: Move FAQs panel after CTAs Streamline onboarding: Move FAQs to the bottom of pages Nov 20, 2024
@ianlin ianlin mentioned this pull request Nov 26, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: tweak Small change, that isn't actually very important.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onboarding: Move FAQs below the CTA button
5 participants