Popper: remove findRefWrapper#7807
Conversation
|
Preview: https://patternfly-react-pr-7807.surge.sh A11y report: https://patternfly-react-pr-7807-a11y.surge.sh |
|
What if we left the old API in place, and added a new option for consumers to use who want to pass react strict mode?
then in code:
|
nicolethoen
left a comment
There was a problem hiding this comment.
As far as I can tell - i've tested all examples of popper i can think of in the code, it seems to be updating and repositioning correctly
|
PR updated -
|
|
Opened #7872 to track a future breaking change to enable the wrapping divs by default. |
|
@jschuler Updated the typings and also added a strict mode example. I was able to get the Menu keyboard handling to work by calling the Added the beta flag to all the |
|
@kmcfaul looks good to me. It would e good to add a unit test to verify in the various components. |
saw SyntaxError: Unexpected token (39:26) in some menu demos
|
Resolved the handful of demos that were no longer rendering due to a syntax error after the rebase. I'm not sure why, but several examples having an optional prop was causing the issue? And not all examples have this issue either, so I'm not sure if that or something else is off. |
|
Noticed that I had to click multiple times on the trigger for the menu to show in this example |
|
@jschuler Yeah I've been on and off trying to debug that. The example uses functions to bypass the findDOMNode call, which I've tweaked to allow keyboard navigation to continue to work. However that change seems to be causing the initial state to be off. Any thoughts? I could change it back to the previous setup but keyboard navigation wasn't working due to the ref being set to a function (which wasn't working with Menu). |
|
I've removed the functional version of bypassing the strict mode error for now as the initial position is not updating properly. We can revisit this method in the future if you see no issues benching it for now @jschuler Added The strict mode error currently may be resolved through the following options:
|
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
* popper take 2 * update drawer integration to account for new wrapping div * update more integration tests with new popper structure * popper take 3, opt in edition * pipe opt in through components that use Popper, remove callbacks from Popper * fix trigger function * update typing, add demo, add beta flag * fix merge conflict error * add unit tests to components for new prop * snap * remove snap * add popperRef method, remove function method, add comments & remove separate example * update types * update tests, fix merge issues * fix integration
What: Closes #6050
Popover and Tooltip work as usual, however there is currently an issue with using the Popper directly (shown in the composable menu demos) where the state/position isn't updating as frequently as before that I am still looking into. For instance, scrolling with Popover causes continuous state updates to the position while the menu demos do not update at all so the popper menu is scrolling out of frame instead of updating to the trigger position.
@jschuler Do you have any thoughts why this may be? I had removed the ref state to just use refs directly so there are less internal state updates, or maybe one of the various memoizations needs to be updated?