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

CustomSelectControlV2: do not flip popover if legacy adapter #63357

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jul 10, 2024

What?

Part of #55023

Do not allow the select popover in the CustomSelectControl V2 legacy adapter to flip when there isn't much space to render below the trigger button.

Why?

This matches more closely the behavior of the legacy, downshift-based component and prevents (avoids it without solving) the issue reported in #63180

How?

By setting the flip property to false on the ariakit select popover

Testing Instructions

  • Render CustomSelectControlV2 legacy adapter and open the select popover
  • Resize its window until there is not enough space for the popover
  • Notice how the popover doesn't flip, but continues to render below the trigger button

Screenshots or screencast

Before (trunk) After (this PR)
Kapture.2024-07-10.at.16.32.46.mp4
Kapture.2024-07-10.at.16.36.45.mp4

Copy link

github-actions bot commented Jul 10, 2024

Flaky tests detected in 061b9e2.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9887447341
📝 Reported issues:

@ciampo ciampo changed the title CustomSelectContorlV2: do not flip if legacy adapter CustomSelectContorlV2: do not flip popover if legacy adapter Jul 10, 2024
@ciampo ciampo self-assigned this Jul 10, 2024
@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Jul 10, 2024
@ciampo ciampo marked this pull request as ready for review July 10, 2024 14:41
@ciampo ciampo requested a review from ajitbohra as a code owner July 10, 2024 14:41
@ciampo ciampo requested a review from a team July 10, 2024 14:41
Copy link

github-actions bot commented Jul 10, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo force-pushed the feat/custom-select-control-flip-height branch 2 times, most recently from be753a3 to 061b9e2 Compare July 11, 2024 07:40
@ciampo ciampo force-pushed the feat/custom-select-control-flip-height branch from 061b9e2 to 31195e6 Compare July 11, 2024 08:35
@ciampo ciampo changed the title CustomSelectContorlV2: do not flip popover if legacy adapter CustomSelectControlV2: do not flip popover if legacy adapter Jul 11, 2024
Copy link
Contributor

@DaniGuardiola DaniGuardiola left a comment

Choose a reason for hiding this comment

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

Tests well for me!

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

I like this 👍

@ciampo ciampo merged commit 098fe40 into trunk Jul 11, 2024
63 checks passed
@ciampo ciampo deleted the feat/custom-select-control-flip-height branch July 11, 2024 10:26
@github-actions github-actions bot added this to the Gutenberg 18.9 milestone Jul 11, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
…ss#63357)

* CustomSelectContorlV2: do not flip if legacy adapter

* CHANGELOG

---

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants