Skip to content

Conversation

@enejb
Copy link
Member

@enejb enejb commented Nov 10, 2025

Related to FORMS-299

This PR fixes the default input colour to be White. Which is the expected colour for inputs when no input is set.

This happends on the Ravington as well as the default Twenty-Twenty One theme.

Fixes THEME-85

Before Revington theme.

Screenshot 2025-11-10 at 3 35 12 PM

After:

Screenshot 2025-11-10 at 3 34 54 PM

This also

Proposed changes:

  • This PR fixes a number of issues.
  1. default backgournd colour should be white.
  2. Checkboxes should work as well.
  3. Prevent double adding checkboxes and radio buttons. (by removing the after psudeo elements) This applies to the twenty-twenty-one theme.
  4. Use the same colour on dropzone as the text. So that the dropzone get the expected text colour.

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

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

Testing instructions:

  • Create a page with all the form fields.
  • Switch to the Ravinngto theme Notice that it looks as expected.
  • Switch to the Twenty Twenty One the Notice that the page looks like you would expect.
  • Switch to many other themes notice that things still work as expected.

@enejb enejb requested review from a team and CGastrell November 10, 2025 23:40
@enejb enejb added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. [Package] Forms labels Nov 10, 2025
@github-actions github-actions bot added [Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Nov 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 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: December 2, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 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/default-background-color branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/default-background-color

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

@jp-launch-control
Copy link

jp-launch-control bot commented Nov 10, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/blocks/contact-form/util/form-styles.js 0/59 (0.00%) 0.00% 1 ❤️‍🩹

Full summary · PHP report · JS report

@simison
Copy link
Member

simison commented Nov 11, 2025

There isn't support for <input type="checkbox"/> yet in global styles like there is for select/other inputs, but hypothetically some day when there is, how does this play along with inheriting styles from theme.json?

Edit: and actually the same question for regular text inputs. :-)

@CGastrell
Copy link
Contributor

We need to carefully test all fields in enough themes. Sometimes glitches come just from the fact that themes have very tough specificity rules and others just have widely generic rules that get applied to our elements. Animated and Outlined styles are also a concern in the test matrix.

That said, this mostly works on my tests. There seems to be a glitch on some themes using Outlined style and the phone field. Outlined style is always a bit glitchy and difficult to work with since it changes the markup structure.

@enejb
Copy link
Member Author

enejb commented Nov 13, 2025

There isn't support for yet in global styles like there is for select/other inputs, but hypothetically some day when there is, how does this play along with inheriting styles from theme.json?

Edit: and actually the same question for regular text inputs. :-)

I haven't looked into this in detail but I noticed that our selectors are are currently wrapped with a where which prevents styles from being overwritten.

The current checkbox implementation doesn't have such where wrapper since it is a pretty opinionated styles. We do allow for sites to have their own style overwrite where the styles that we provide can be removed.

@enejb
Copy link
Member Author

enejb commented Nov 13, 2025

We need to carefully test all fields in enough themes. Sometimes glitches come just from the fact that themes have very tough specificity rules and others just have widely generic rules that get applied to our elements. Animated and Outlined styles are also a concern in the test matrix.

I did test across a lot of themes and this worked as expected for me.

I need to see how this impacts the phone field as well. To make sure that it works as expected.
I will test more with the Animated and Outlined styles to make sure that things work more like we would expect them to.

Updates JS to use a white fallback when input background is transparent. Changes SCSS to use a CSS variable for checked input background color, improving consistency with theme text color.
@enejb enejb force-pushed the fix/default-background-color branch from 45ee841 to 2019276 Compare November 13, 2025 20:27
@simison
Copy link
Member

simison commented Nov 20, 2025

Some themes to keep testing that have been problematic:

  • Ravington
  • Dravix
  • Twenty Twenty One
  • Twenty Twenty Five

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) [Feature] Contact Form [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Review This PR is ready for review. [Type] Bug When a feature is broken and / or not performing as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants