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(combobox): unexpected overlay opening #2369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxevilmind
Copy link
Contributor

@maxevilmind maxevilmind commented Sep 27, 2024

What I did

Added condition to check if overlay should be opened, but this change breaks 17 unit tests due to differences between programmatic actions in unit tests and actual UI behavior. Verified that affected scenarios function as expected in the UI.

Unit tests need further work as discussed with @okadurin. He confirmed the unexpected unit tests behavior.

Reproduction scenario of a bug I am trying to fix:

  1. Override _showOverlayCondition with return false to simplify the use case when subclassers override this method and return false due to some logic.
  2. Go to the multiple choice combobox and start typing
  3. You will notice that the overlay opens on keydown and closes on key release. Input is cleared as a side-effect.

Please see what kind of fix could be applied to unit tests.

Copy link

changeset-bot bot commented Sep 27, 2024

⚠️ No Changeset found

Latest commit: f9ebfd7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@maxevilmind maxevilmind changed the title fix: unexpected overlay opening fix(combobox): unexpected overlay opening Sep 27, 2024
@maxevilmind maxevilmind force-pushed the fix/missing-widget-deployed-url branch 3 times, most recently from 712b475 to d2f9e21 Compare September 27, 2024 14:08
@maxevilmind
Copy link
Contributor Author

maxevilmind commented Sep 27, 2024

As an example of failed programmatic interaction we can use this test:
clears textbox after selection of a new item on click
It fails on expect(el.opened).to.equal(true);
After mimicking user typing the overlay does not open, while in the UI it opens as expected.
Similar behavior is observable in the other tests.

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.

1 participant