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

Popover fixes #757

Merged
merged 16 commits into from
Nov 27, 2021
Merged

Popover fixes #757

merged 16 commits into from
Nov 27, 2021

Conversation

glsdown
Copy link
Contributor

@glsdown glsdown commented Oct 29, 2021

This should fix a number of issues with the popover (and overlay) components as raised in #750 . Specifically:

  • legacy popover was not working - this issue was in the Overlay component, and was due to a fix for an unknown issue in a test a while ago. To fix this, I am now making use of react-bootstrap's rootClose property of the Overlay when legacy is selected. Integration test has been added for this.
  • hide_arrow was no longer working - this was a frustrating fix as it has meant I've had to recreate the react-bootstrap Popover component in the private folder. Unit test has been added for this.
  • offset was no longer working - I have added some detail on the structure that offset should take, and am now passing this into the popperconfig as required. I tried to add a unit test for this, but jest was not playing ball, and I couldn't get it to tell me the location of the popover. I have included an example in the docs though 🤞

In addition, I have added a small feature to the Popover, when body=True, it will automatically render that text in a popover body to remove the need to always wrap the Popover contents.

I have also tried to clarify and tidy up some of the docs and added examples for hide_arrow and offset.

One thing to note is that I don't think having multiple trigger options available works very well. For example, having legacy and hover - when clicking on the target, and hovering over it the popover appears, but disappears as the hover disappearing takes priority.

@tcbegley tcbegley merged commit 9606086 into main Nov 27, 2021
@tcbegley tcbegley deleted the popover-fixes branch November 27, 2021 15:37
This was referenced Nov 27, 2021
tcbegley added a commit that referenced this pull request Nov 28, 2021
* Fix issue related to legacy trigger

* Fix support for hide_arrow

* Add in support for offset

* Improve tests

* Bump react-bootstrap version

* Format

* Add additional popover examples

* Change default body behaviour

* Add legacy integration test

* Improve popover doc examples

* Format

* Update dependencies

* Remove redundant Jest config

* Set rootClose to false if legacy trigger removed

* Remove rogue comma

* Fix popover tests

Co-authored-by: tcbegley <tomcbegley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants