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

Make Popover a presentational component #1857

Closed
wants to merge 1 commit into from
Closed

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Jan 21, 2025

This PR makes the Popover a presentational component, accepting any DIV HTML attribute which is passed down to the outermost div.

The motivation for this PR is that we needed to be able to pass an id to Popover. Since I imagine we may need to add more arbitrary attributes in future, I checked how we handle similar components, and PresentationalComponents seemed like a reasonable approach.

@acelaya acelaya requested a review from robertknight January 21, 2025 11:04
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (30bba32) to head (aba87b0).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1857   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           70        70           
  Lines         1306      1306           
  Branches       482       482           
=========================================
  Hits          1306      1306           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya
Copy link
Contributor Author

acelaya commented Jan 21, 2025

I'm putting this back as draft, as it may not be needed in the end.

@acelaya acelaya marked this pull request as draft January 21, 2025 11:16
@acelaya
Copy link
Contributor Author

acelaya commented Jan 21, 2025

As described above, the motivation for this was supporting proper accessibility in at-mentions (see hypothesis/client#6769), but for that the id attribute needs to be set in the listbox, not the popover, so closing this for now.

@acelaya acelaya closed this Jan 21, 2025
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