jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Forms: Update the date picker

Open enejb opened this issue 8 months ago • 5 comments

Based on the previous https://github.com/Automattic/jetpack/pull/41650

Before:

https://github.com/user-attachments/assets/d093eed4-3722-44c4-93a0-d8396d1af0ac

Screenshot 2025-06-12 at 12 57 20 PM

After:

https://github.com/user-attachments/assets/9910b361-c5c6-424f-af5c-22186967a22d

Screenshot 2025-06-12 at 12 53 27 PM

This PR updates the date picker library to be more performert, accessible (keyboard navigation)

Proposed changes:

  • Removed the current date picker for a newer date picker library that is keyboard accessible.
  • Remove the dependency on jQuery.

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:

Add the date picker field to the forms block.

On the front end. You should see a much more performance date picker. ( Less JS and css code loaded ) You should be able to navigate to the date that you specify. Try different keyboard keys do they work as expected?

Test it on a mobile device. Does it work as expected for you?

enejb avatar Jun 12 '25 19:06 enejb

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 or WordPress.com Site Helper), and enable the update/date-picker-rebase branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/date-picker-rebase
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/date-picker-rebase

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[bot] avatar Jun 12 '25 20:06 github-actions[bot]

Thank you for your PR!

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

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Review, ...).
  • :white_check_mark: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: 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 :robot:


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: August 5, 2025
    • Code freeze: August 4, 2025

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

github-actions[bot] avatar Jun 12 '25 20:06 github-actions[bot]

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/contact-form/class-contact-form-field.php 599/957 (62.59%) 0.68% 0 💚

14 files are newly checked for coverage. Only the first 5 are listed here.

File Coverage
projects/packages/forms/src/contact-form/js/date-picker.js 0/5 (0.00%) 💔
projects/packages/forms/src/contact-form/libs/date-picker/date-picker-options.ts 0/47 (0.00%) 💔
projects/packages/forms/src/contact-form/libs/date-picker/date-picker.ts 0/7 (0.00%) 💔
projects/packages/forms/src/contact-form/libs/date-picker/lib/date.ts 0/41 (0.00%) 💔
projects/packages/forms/src/contact-form/libs/date-picker/lib/dom.ts 0/4 (0.00%) 💔

Full summary · PHP report · JS report

Coverage check overridden by https://github.com/Automattic/jetpack/labels/Coverage%20tests%20to%20be%20added%20later.

jp-launch-control[bot] avatar Jun 12 '25 20:06 jp-launch-control[bot]

We create a PR - https://github.com/Automattic/jetpack/pull/43957 that adds translations only so that once we have more of them in. We can merge this PR.

enejb avatar Jun 13 '25 22:06 enejb

Can you elaborate what's going on with the library addition here:

  • Why not import as a dependency, and copy to the codebase?
  • What's going on with the typescript on that package, was that another fork of the original package, or something you copied from somewhere to this lib, or something else?

simison avatar Jun 14 '25 08:06 simison