Skip to content

Conversation

@CGastrell
Copy link
Contributor

@CGastrell CGastrell commented Dec 1, 2025

Part of https://github.com/Automattic/big-sky-plugin/issues/4708

Proposed changes:

  • Make form buttons take full width on mobile devices to match the behavior of other form fields

Before: Buttons did not take full width on mobile

Screen.Recording.2025-12-01.at.16.53.56.mov

After: Buttons take full width on mobile, consistent with other form fields

Screen.Recording.2025-12-01.at.16.53.12.mov

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

https://github.com/Automattic/big-sky-plugin/issues/4708

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Install the Jetpack Forms block on a WordPress site
  • Create a new post or page and add a simple form field to the form, here's the code for the form on the video:
<!-- wp:group {"metadata":{"name":"Newsletter"},"align":"full","className":"alignfull is-style-default","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group alignfull is-style-default" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group alignwide"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:heading -->
<h2 class="wp-block-heading">Subscribe</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Be the first to know about sales, new arrivals, and offers.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:jetpack/contact-form {"customThankyouHeading":"Thank you for subscribing!","customThankyouMessage":"Please check your email to confirming your subscription.","confirmationType":"text","jetpackCRM":true,"salesforceData":{"organizationId":"","sendToSalesforce":false},"mailpoet":{"listId":"1","listName":"Mailing list","enabledForForm":true},"saveResponses":false,"emailNotifications":false,"disableGoBack":true,"className":"is-style-outlined"} -->
<div class="wp-block-jetpack-contact-form is-style-outlined"><!-- wp:jetpack/field-email {"required":true,"requiredIndicator":false,"width":"auto"} -->
<div><!-- wp:jetpack/label {"label":"Enter your email…","requiredIndicator":false,"lock":{"move":false,"remove":false}} /-->

<!-- wp:jetpack/input {"lock":{"move":false,"remove":false}} /--></div>
<!-- /wp:jetpack/field-email -->

<!-- wp:jetpack/button {"element":"button","text":"Subscribe","width":"","lock":{"move":false,"remove":false}} /--></div>
<!-- /wp:jetpack/contact-form --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
  • Preview the page on a mobile device or use browser DevTools mobile view (viewport width < 600px)
  • Verify that the button takes the full width of the form container, matching the behavior of other form fields like text inputs
  • Compare with text input fields to ensure consistent width behavior
  • Confirm the same behavior on frontend

@CGastrell CGastrell added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Package] Forms Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR labels Dec 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the fix/forms-buttons-mobile-behavior branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/forms-buttons-mobile-behavior

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form labels Dec 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: January 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control
Copy link

jp-launch-control bot commented Dec 1, 2025

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

Coverage check overridden by Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR .

@CGastrell CGastrell self-assigned this Dec 1, 2025
@iamtakashi
Copy link
Contributor

@CGastrell Nice, I didn't know we could leave the button's width setting empty! What do you think about adding an "auto" option, like the email field, that behaves the same as when it's set to unspecified/empty? If it's difficult to add, never mind, but I thought it might help the UX.

@CGastrell CGastrell requested a review from a team December 2, 2025 14:36
@CGastrell
Copy link
Contributor Author

@CGastrell Nice, I didn't know we could leave the button's width setting empty! What do you think about adding an "auto" option, like the email field, that behaves the same as when it's set to unspecified/empty? If it's difficult to add, never mind, but I thought it might help the UX.

Indeed, let me look into it. For now my prio is check what's going on with the border-radius, but those both fall into the same category: the initial default values for some settings/styles don't seem to take. Border-radius does the same thing, says 5 but shows none, you touch the slider and suddenly all works as expected.

@iamtakashi
Copy link
Contributor

Yes, that discrepancy in the border radius value is confusing. Thanks for looking into it. I appreciate it.

@CGastrell CGastrell force-pushed the fix/forms-buttons-mobile-behavior branch from c138887 to b835756 Compare December 4, 2025 21:16
@CGastrell CGastrell merged commit 2af3cc5 into trunk Dec 8, 2025
68 checks passed
@CGastrell CGastrell deleted the fix/forms-buttons-mobile-behavior branch December 8, 2025 14:05
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Dec 8, 2025
@github-actions github-actions bot added this to the jetpack/15.4 milestone Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Contact Form Form block (also see Contact Form label) Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR [Feature] Contact Form [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants