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

A4A: Fix discrepancies in the Signup form v2 styling. #99414

Merged
merged 5 commits into from
Feb 7, 2025

Conversation

jkguidaven
Copy link
Contributor

@jkguidaven jkguidaven commented Feb 6, 2025

This PR fixes discrepancies on the Signup form v2 styling based on the original design.

NOTE: When testing this, make sure you set your Browser's preference to light mode. The Dark mode theme will be addressed on a separate PR.

Screenshot 2025-02-06 at 11 04 30 PM Screenshot 2025-02-06 at 11 04 39 PM Screenshot 2025-02-06 at 11 04 48 PM Screenshot 2025-02-06 at 11 05 00 PM Screenshot 2025-02-06 at 11 05 11 PM

Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1729
Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1730
Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1732
Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1733

Proposed Changes

  • Removed some form overrides as the current Form controls already aligns with the design. This includes, form label colors, additional divs and spacing.
  • Add the FormFooter component to standardize footer in the Form.

Why are these changes being made?

  • This is part of the new Signup form project for WC Asia preparation.

Testing Instructions

  • Use the A4A live link and go to the /signup/wc-asia page.
  • Test that the form styling follows the new design.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@jkguidaven jkguidaven self-assigned this Feb 6, 2025
Comment on lines +65 to +110
const topGoalOptions = [
{ label: translate( 'Access to cutting-edge technology' ), value: 'cutting_edge_tech' },
{
label: translate( 'Comprehensive support and troubleshooting' ),
value: 'comprehensive_support',
},
{
label: translate( 'Lead generation and new business opportunities' ),
value: 'lead_generation',
},
{ label: translate( 'Training and education for your team' ), value: 'training_education' },
{
label: translate( 'Exclusive discounts or revenue-sharing options' ),
value: 'exclusive_discounts',
},
];

const mainGoal2025Options = [
{ label: translate( 'Scaling the agency significantly' ), value: 'scaling_agency' },
{ label: translate( 'Diversifying offered services' ), value: 'diversifying_services' },
{
label: translate( 'Increasing the number of long-term clients' ),
value: 'increasing_clients',
},
{ label: translate( 'Expanding into new markets or territories' ), value: 'expanding_markets' },
{
label: translate( "Strengthening the agency's brand and reputation" ),
value: 'strengthening_brand',
},
];

const workModelOptions = [
{
label: translate(
'Refer customers to Automattic products/services to purchase on their own'
),
value: 'refer_customers',
},
{
label: translate( "Purchase on our clients' behalf and resell Automattic products/services" ),
value: 'purchase_resell',
},
{ label: translate( 'A combination of referring and reselling' ), value: 'combination' },
{ label: translate( 'Other models (please explain)' ), value: 'other' },
];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To make it easier for us to change template later, we put options into arrays.

Comment on lines 25 to 49
const BluePrintFormRadio = ( {
label,
checked,
onChange,
}: {
label: string;
checked: boolean;
onChange: () => void;
} ) => {
return (
<div
className="blue-print-form__radio"
onClick={ onChange }
role="button"
tabIndex={ 0 }
onKeyDown={ ( e ) => {
if ( e.key === 'Enter' ) {
onChange();
}
} }
>
<FormRadio label={ label } checked={ checked } onChange={ onChange } />
</div>
);
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current FormRadio does not support click event on the label. This wrapper allows us to make the entire radio and label clickable improving UX.

@matticbot
Copy link
Contributor

matticbot commented Feb 6, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~145 bytes added 📈 [gzipped])

name                     parsed_size           gzip_size
a8c-for-agencies-signup       -606 B  (-0.4%)     +145 B  (+0.3%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@@ -46,124 +47,116 @@ export default function PersonalizationForm( { onContinue }: Props ) {
title={ translate( 'Personalize your experience' ) }
description={ translate( "We'll tailor the product and onboarding for you." ) }
>
<div className="signup-multi-step-form__fields">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need this. The current form already has 16px spacing.

) }
>
<div className="signup-multi-step-form__fields">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need this. The current form already has 16px spacing.

@jkguidaven jkguidaven requested a review from a team February 6, 2025 15:16
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 6, 2025
@jkguidaven jkguidaven marked this pull request as ready for review February 6, 2025 15:17
@matticbot
Copy link
Contributor

matticbot commented Feb 6, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/a4a/signup-form-v2-styling on your sandbox.

@@ -18,6 +22,32 @@ type FormData = {
specificApproach: string;
};

const BluePrintFormRadio = ( {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can name it BlueprintFormRadio with small p.

Copy link
Contributor

@andrii-lysenko andrii-lysenko 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 adding proper styling. The code is clean and UI looks great for me. I think we can merge this and iterate if needed.

@jkguidaven jkguidaven force-pushed the update/a4a/signup-form-v2-styling branch from 706e9cb to a498ff1 Compare February 7, 2025 09:25
@jkguidaven jkguidaven merged commit b2d2e73 into trunk Feb 7, 2025
13 checks passed
@jkguidaven jkguidaven deleted the update/a4a/signup-form-v2-styling branch February 7, 2025 09:45
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 7, 2025
@a8ci18n
Copy link

a8ci18n commented Feb 7, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17234101

Some locales (Brazilian Portuguese, Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @jkguidaven for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Feb 10, 2025

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants