Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Post Publishing Popover: Popover moves when certain dates are clicked #30298

Open
wants to merge 1 commit into
base: trunk
from

Conversation

@allilevine
Copy link
Contributor

@allilevine allilevine commented Mar 26, 2021

Description

Fix Post Publishing popover glitch by changing the popover anchor ref to the containing div (PanelRow). Requires changing PanelRow to accept a forwarding ref.

Alternatively, we can change PanelRow to accept a ref as a prop and include the forwardRef() wrapper in PostSchedule instead.

Fixes #29899

How has this been tested?

  • Add or edit a post.
  • Open the Post Publishing popover by clicking on the publish date or "Immediately."
  • Click on various dates in the picker and confirm that the popover does not move or change position.
  • Regression: check that other instances of the PanelRow component function correctly and don't require a ref.

Screenshots

popovernotmoving

Types of changes

Bug fix:

  • Changes the PanelRow component to accept a forwarding ref
  • Creates a ref in PostSchedule and assigns it to PanelRow
  • Passes the ref to Dropdown as an anchor ref and popover prop

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
Fix Post Publishing popover glitch by changing the popover anchor ref to
the containing div (PanelRow). Requires changing PanelRow to accept a
forwarding ref.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant