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(dropdown): fix calculation of max-items for non-Chromium browsers. #5677

Merged

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Nov 1, 2022

Related Issue: #5663

Summary

This fixes a regression caused by #5399 where the floating-ui element is placed offscreen and its styles change the offsetParent in non-Chromium browsers.

This codepen shows the difference when opened in Chromium vs non-Chromium browsers: https://codepen.io/jcfranco/pen/OJEMwzz?editors=1010

@jcfranco jcfranco requested a review from a team as a code owner November 1, 2022 19:35
@jcfranco jcfranco self-assigned this Nov 1, 2022
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Nov 1, 2022
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Nice! A one liner!

Guess we need to start getting screenshots on other browsers :)

@jcfranco
Copy link
Member Author

jcfranco commented Nov 1, 2022

Guess we need to start getting screenshots on other browsers :)

Yeah, we can reconsider expanding our coverage in the near future. Maybe for starters we can add screenshots for non-Chrome fixes? cc @benelan

@jcfranco jcfranco changed the title fix(dropdown): fix calculation of max-items for non-Chrome browsers. fix(dropdown): fix calculation of max-items for non-Chromium browsers. Nov 1, 2022
@jcfranco jcfranco merged commit 3e4a575 into master Nov 1, 2022
@jcfranco jcfranco deleted the jcfranco/5663-ensure-max-items-is-computed-consistently branch November 1, 2022 22:58
@eriklharper
Copy link
Contributor

Maybe for starters we can add screenshots for non-Chrome fixes? cc @benelan

+1

@benelan
Copy link
Member

benelan commented Nov 7, 2022

Yeah Chromatic supports Firefox, I'll look to see if there is a way to specify which browser to run on per snapshot

@eriklharper
Copy link
Contributor

Yeah Chromatic supports Firefox, I'll look to see if there is a way to specify which browser to run on per snapshot

That would be very cool if that's possible.

@benelan
Copy link
Member

benelan commented Nov 7, 2022

Unfortunately it's not possible. We would have to run all snapshots on both chrome and firefox in order to add coverage for the non-Chrome fixes. Could be a candiate for our first official enhancement request

@eriklharper
Copy link
Contributor

Unfortunately it's not possible. We would have to run all snapshots on both chrome and firefox in order to add coverage for the non-Chrome fixes. Could be a candiate for our first official enhancement request

Had a feeling that was the case. Certainly would make for a great experience though if we could add browser-specific snapshots since we do get reports on specific UI issues that would be excellent to capture with just a single or small set of very specific cases that are browser-specific. We should definitely request this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants