From 8b0378b780d40f35c2e5c0575eb4218b85e26151 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Thu, 16 Jan 2025 16:59:47 +0200 Subject: [PATCH 1/3] Forms: settings, opt-in for default 40px size in gutenberg --- .../components/jetpack-email-connection-settings.js | 2 ++ .../blocks/contact-form/components/jetpack-field-controls.js | 2 ++ .../jetpack-salesforce-lead-form-settings.js | 1 + projects/packages/forms/src/blocks/contact-form/edit.js | 1 + 4 files changed, 6 insertions(+) diff --git a/projects/packages/forms/src/blocks/contact-form/components/jetpack-email-connection-settings.js b/projects/packages/forms/src/blocks/contact-form/components/jetpack-email-connection-settings.js index 77579069223b4..b697dc4844814 100644 --- a/projects/packages/forms/src/blocks/contact-form/components/jetpack-email-connection-settings.js +++ b/projects/packages/forms/src/blocks/contact-form/components/jetpack-email-connection-settings.js @@ -110,6 +110,7 @@ const JetpackEmailConnectionSettings = ( { 'jetpack-forms' ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> @@ -122,6 +123,7 @@ const JetpackEmailConnectionSettings = ( { placeholder={ __( 'Enter a subject', 'jetpack-forms' ) } onChange={ newSubject => setAttributes( { subject: newSubject } ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> ); diff --git a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-controls.js b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-controls.js index 23e65e7e64f51..793ec274e196e 100644 --- a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-controls.js +++ b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-controls.js @@ -126,6 +126,7 @@ const JetpackFieldControls = ( { 'jetpack-forms' ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> ), , @@ -274,6 +275,7 @@ const JetpackFieldControls = ( { 'jetpack-forms' ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> diff --git a/projects/packages/forms/src/blocks/contact-form/components/jetpack-salesforce-lead-form/jetpack-salesforce-lead-form-settings.js b/projects/packages/forms/src/blocks/contact-form/components/jetpack-salesforce-lead-form/jetpack-salesforce-lead-form-settings.js index 343b9ec1fce2b..4871c158d4b19 100644 --- a/projects/packages/forms/src/blocks/contact-form/components/jetpack-salesforce-lead-form/jetpack-salesforce-lead-form-settings.js +++ b/projects/packages/forms/src/blocks/contact-form/components/jetpack-salesforce-lead-form/jetpack-salesforce-lead-form-settings.js @@ -138,6 +138,7 @@ export default ( { salesforceData, setAttributes, instanceId } ) => { onChange={ setOrganizationId } help={ __( 'Enter the Salesforce organization ID to send Leads to.', 'jetpack-forms' ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> { organizationIdError && ( diff --git a/projects/packages/forms/src/blocks/contact-form/edit.js b/projects/packages/forms/src/blocks/contact-form/edit.js index 355b02748cbfc..e49f36bf2b4e5 100644 --- a/projects/packages/forms/src/blocks/contact-form/edit.js +++ b/projects/packages/forms/src/blocks/contact-form/edit.js @@ -184,6 +184,7 @@ export const JetpackContactFormEdit = forwardRef( placeholder={ __( 'Your message has been sent', 'jetpack-forms' ) } onChange={ newHeading => setAttributes( { customThankyouHeading: newHeading } ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> ) } From 97957c5591b48352521961ef611812a8bc931f80 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Thu, 16 Jan 2025 17:00:24 +0200 Subject: [PATCH 2/3] changelog --- .../forms/changelog/update-forms-textcontrol-40px-default | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/packages/forms/changelog/update-forms-textcontrol-40px-default diff --git a/projects/packages/forms/changelog/update-forms-textcontrol-40px-default b/projects/packages/forms/changelog/update-forms-textcontrol-40px-default new file mode 100644 index 0000000000000..7a09504a1b859 --- /dev/null +++ b/projects/packages/forms/changelog/update-forms-textcontrol-40px-default @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Forms: settings, opt-in for default 40px size in gutenberg From 340534c5d2775d56572736fbc1f7795a9407bce7 Mon Sep 17 00:00:00 2001 From: Enej Bajgoric Date: Thu, 16 Jan 2025 14:02:26 -0800 Subject: [PATCH 3/3] Update the select field as well to use the new size. So that it looks aligned. --- .../src/blocks/contact-form/components/jetpack-field-consent.js | 1 + .../blocks/contact-form/components/jetpack-field-datepicker.js | 1 + projects/packages/forms/src/blocks/contact-form/edit.js | 1 + 3 files changed, 3 insertions(+) diff --git a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-consent.js b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-consent.js index 3e5e11229bc7e..06cadae1c2c12 100644 --- a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-consent.js +++ b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-consent.js @@ -79,6 +79,7 @@ const JetpackFieldConsent = ( { ] } onChange={ value => setAttributes( { consentType: value } ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> diff --git a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-datepicker.js b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-datepicker.js index 47188aa488e71..ce84377e71240 100644 --- a/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-datepicker.js +++ b/projects/packages/forms/src/blocks/contact-form/components/jetpack-field-datepicker.js @@ -98,6 +98,7 @@ const JetpackDatePicker = props => { 'jetpack-forms' ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> ), }, diff --git a/projects/packages/forms/src/blocks/contact-form/edit.js b/projects/packages/forms/src/blocks/contact-form/edit.js index e49f36bf2b4e5..fff949c91a860 100644 --- a/projects/packages/forms/src/blocks/contact-form/edit.js +++ b/projects/packages/forms/src/blocks/contact-form/edit.js @@ -175,6 +175,7 @@ export const JetpackContactFormEdit = forwardRef( ] } onChange={ newMessage => setAttributes( { customThankyou: newMessage } ) } __nextHasNoMarginBottom={ true } + __next40pxDefaultSize={ true } /> { 'redirect' !== customThankyou && (