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

[Social Link]: Correctly position the link popover when List View is open #32525

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

stacimc
Copy link
Contributor

@stacimc stacimc commented Jun 8, 2021

Description

Issue #30120

When the List View is open in the site editor, if you click on an icon in the Social Icons block to edit the url, the popover will float quite far away from the block. This PR updates the block to pass an anchorRef to the URLPopover so that it can correctly position the control even when the List View is open.

How has this been tested?

(See screenshots)

  1. In the site editor, add a Social Icons block and add a few icons.
  2. Click on one of the icons to edit the url. Notice that the popover is positioned as expected, by the element being edited.
  3. Open the List View and click on another icon. Verify that the popover is still positioned correctly.

Screenshots

Before After
Screen Capture on 2021-06-08 at 12-00-00 Screen Capture on 2021-06-08 at 11-48-33

Types of changes

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

@stacimc stacimc requested a review from mkaz as a code owner June 8, 2021 19:07
@aaronrobertshaw aaronrobertshaw self-requested a review June 9, 2021 02:45
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

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

Nice work! ✨

I could replicate the issue prior to applying this PR. Afterwards, the link popover position is much better in the site editor. The block editor was unaffected.

Before
Screen Shot 2021-06-09 at 12 37 58 pm
After
Screen Shot 2021-06-09 at 12 40 22 pm

The e2e failures look unrelated. I'll re-run those and when they pass, I'm happy to merge this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants