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+chore: Resolve Overflow in Settings Modal & Upgrade to Headless UI 2.0 #2661

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

techwithanirudh
Copy link
Contributor

@techwithanirudh techwithanirudh commented May 10, 2024

Summary

This pull request resolves a visibility issue within the settings modal where dropdown options were obscured due to the overflow: auto CSS property. The migration to Headless UI 2.0, with its new portal feature, effectively counters this problem by rendering dropdown elements outside their bounding container, ensuring they display fully.

Detailed Description

Previously, the settings modal was implemented using Radix UI, which did not support the necessary features to overcome the overflow limitations that were causing dropdown elements to be clipped. The update to Headless UI 2.0 brings a solution through the use of portals, which manage overflow issues by rendering components in a separate DOM node outside of the CSS overflow context.

This update required the settings modal to be rewritten in Headless UI to take advantage of the new portal feature. Furthermore, due to breaking changes introduced by the upgrade to Headless UI 2.0, other parts of the application that utilized Headless UI 1.0 also needed updates to maintain functionality and coherence across the board.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

N/A

Test Configuration:

N/A

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@techwithanirudh techwithanirudh changed the title fix: dropdown overflow chore: Upgrade to Headless UI 2.0 May 11, 2024
@techwithanirudh techwithanirudh marked this pull request as ready for review May 12, 2024 08:56
@techwithanirudh
Copy link
Contributor Author

@danny-avila Could you please review this P.R?

@techwithanirudh techwithanirudh changed the title chore: Upgrade to Headless UI 2.0 🔧 fix+chore: Resolve Overflow in Settings Modal & Upgrade to Headless UI 2.0 May 12, 2024
@danny-avila
Copy link
Owner

Can you potentially address the failing frontend tests?

https://greenonsoftware.com/articles/testing/testing-and-mocking-resize-observer-in-java-script/

@techwithanirudh
Copy link
Contributor Author

Can you potentially address the failing frontend tests?

https://greenonsoftware.com/articles/testing/testing-and-mocking-resize-observer-in-java-script/

@danny-avila Could you help me on this?

@danny-avila
Copy link
Owner

Can you potentially address the failing frontend tests?
https://greenonsoftware.com/articles/testing/testing-and-mocking-resize-observer-in-java-script/

@danny-avila Could you help me on this?

seems to be an issue with headless-ui:

tailwindlabs/headlessui#2832

@techwithanirudh
Copy link
Contributor Author

Closed, due to HeadlessUI

@techwithanirudh techwithanirudh marked this pull request as draft May 15, 2024 03:54
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.

None yet

2 participants