Skip to content

Conversation

@enejb
Copy link
Member

@enejb enejb commented Nov 18, 2025

Related to FORMS-299

This PR addresses some of the default behaviour of outline forms. To make them work more like expected.

Proposed changes:

  • It implements the form input to match the background colour of the form. This works even when the form adds a custom colour for the whole form.
  • It make sure that there is a border that is applied to the outline form. If the theme doesn't set one for the input fields.
  • It adds a default color for the input field. that matches the body text colour. So that form inputs be default are readable.
  • It fixes the checkboxes input to work

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

This PR is related to #45866
When I was working on #45866 I noticed that the outline form doesn't quite work as expected.
The solution was getting to complex so I decided to create a new PR for the outline form to make it work more like it should work.

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

No

Testing instructions:

You will need a few different variations of the outline form.
All on the same page.
Create a default one.
Create one with plate colors that are coming from the form.
Create one with custom colors that are coming from the form.
Create one with palate colors coming from the input fields.
Create one with custom colors coming from the input fields.

Add the following inputs.
Default inputs. ( text, email, name, textare )
Phone field with and without international fields.
Image selection.
Single Checkboxes. Consent and regular checkboxs.
Radio buttons.
file upload

switch between different themes. ( not that the palate color might produce unreadable results) go to the editor and make sure that in the editor you see the same "unreadable error".

@enejb enejb requested a review from a team November 18, 2025 19:22
@enejb enejb added [Status] Needs Review This PR is ready for review. [Package] Forms [Type] Bug When a feature is broken and / or not performing as intended labels Nov 18, 2025
@github-actions
Copy link
Contributor

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

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 [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Nov 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 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.

@jp-launch-control
Copy link

jp-launch-control bot commented Nov 18, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/modules/form/view.js 0/287 (0.00%) 0.00% 10 💔

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

Copy link
Contributor

@edanzer edanzer left a comment

Choose a reason for hiding this comment

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

What we're trying to do here makes sense for outline forms. And it tests well. I installed a range of dark themes to test (see video below), and tested against white themes.

Having struggled with this kind of theme CSS consistency, I'd wouldn't be surprised if we eventually find some other use cases where the new rules break down. But that's just part of development in the WordPress space.

What I'm seeing on a range of dark forms with different form colors/settings:
https://github.com/user-attachments/assets/14ef2b52-2d3d-427b-bf47-c01366c01f4d

'--jetpack--contact-form--border': border,
'--jetpack--contact-form--border-color': borderColor,
'--jetpack--contact-form--border-size': borderWidth,
'--jetpack--contact-form--border-size-outline': borderWidthOutline,
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is meant to be a fallback for Outlined style I'd say let's use the same wording "outlined" (specially since outline is a different CSS property). Easy fix though.

backdropFilter: inputBackdropFilter,
} = window.getComputedStyle( inputNode );

const borderWidthOutline =
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need this var? By its definition and usage (if I'm not mistaken) we could use border-width: max( var( --jetpack--contact-form--border-size, 0 ), '1px' ); instead.

Would be good to test this with strange values though.

@CGastrell
Copy link
Contributor

Wondering now if we should be trying to control input background color so hard. Editor seems to be doing fine with the default (field), and we've been trying so hard to probe the "right" color when, maybe, we don't need to set anything unless it's been set from the editor. Maybe it would all be better if we let it be whatever the background color is and detect it only for blending purposes, not to forcibly set the input background per se. I have to test that theory though and that's gonna take me on a long road of multiplicity of themes, field types and form styles :D

@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.

5 participants