Skip to content

Conversation

@mattsherman
Copy link
Contributor

@mattsherman mattsherman commented May 25, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR updates the positioning of the DateTimePickerControl's dropdown to use popoverProps.placement instead of the deprecated position prop. This accomplishes to

It also sets the popoverProps.anchor to tweak the positioning of the dropdown (it will stay closer to the input control in all orientations).

Closes #38447.

Before

Note that the dropdown is not left-aligned with the input control.

Screenshot 2023-05-25 at 16 14 46

After

Note that the dropdown is left-aligned with the input control.

Screenshot 2023-05-25 at 15 16 31

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Enable the block-based product editor
  2. Go to Products > Add New
  3. Go to the Pricing tab
  4. Enter a List price and Sale price
  5. Enable Schedule sale
  6. Verify the positioning of the dropdown in the date fields is correct.
  7. Verify the following warning does not appear in the browser console.
`position` prop in wp.components.Dropdown is deprecated since version 6.2. Please use `popoverProps.placement` prop instead. Note: Note that the `position` prop will override any values passed through the `popoverProps.placement` prop.

@mattsherman mattsherman self-assigned this May 25, 2023
@github-actions github-actions bot added the package: @woocommerce/components issues related to @woocommerce/components label May 25, 2023
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 7e4543a

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 49s
E2E Tests1940010020417m 52s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@mattsherman mattsherman marked this pull request as ready for review May 25, 2023 20:47
@mattsherman mattsherman requested a review from a team May 26, 2023 14:24
@github-actions
Copy link
Contributor

Hi , @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@mdperez86 mdperez86 left a comment

Choose a reason for hiding this comment

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

LGTM. Nice job @mattsherman !!!

@mattsherman mattsherman merged commit 27574c9 into trunk May 29, 2023
@mattsherman mattsherman deleted the update/date-time-picker-control-dropdown branch May 29, 2023 20:12
@github-actions github-actions bot added this to the 7.9.0 milestone May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: @woocommerce/components issues related to @woocommerce/components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DateTimePickerControl: Use popoverProps.placement instead of position for dropdown

3 participants