This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
+ Coverage 72.24% 72.78% +0.53%
==========================================
Files 752 748 -4
Lines 5614 5665 +51
Branches 1671 1633 -38
==========================================
+ Hits 4056 4123 +67
+ Misses 1551 1535 -16
Partials 7 7
Continue to review full report at Codecov.
|
5 tasks
kuzhelov
reviewed
May 9, 2019
packages/react/src/components/Popup/createPopperReferenceProxy.ts
Outdated
Show resolved
Hide resolved
kuzhelov
reviewed
May 9, 2019
packages/react/src/components/Popup/createPopperReferenceProxy.ts
Outdated
Show resolved
Hide resolved
kuzhelov
reviewed
May 9, 2019
…p/poup # Conflicts: # CHANGELOG.md # packages/react/src/components/Popup/Popup.tsx
kuzhelov
reviewed
May 9, 2019
packages/react/src/components/Popup/createPopperReferenceProxy.ts
Outdated
Show resolved
Hide resolved
kuzhelov
approved these changes
May 9, 2019
kuzhelov
reviewed
May 9, 2019
bmdalex
approved these changes
May 9, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 would be great to get this merged soon so I can reuse it for Dropdown #1294
…-ui/react into exp/poup # Conflicts: # CHANGELOG.md
bmdalex
pushed a commit
that referenced
this pull request
May 9, 2019
* Popup experiment * cleanup * more cleanups * rename file * add changelog entries * add "implements PopperJS.ReferenceObject" * replace `triggerDomElement` with `triggerRef.current` * update typings * rewrite to WeakMap * update comment * remove memoization
5 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGES
defaultTarget
prop is removed onPopup
component, please use directlytarget
prop.Goal
This PR backports changes from SUIR. It allows us to avoid double rendering of
Popup
because we don't storetarget
in state anymore.target
is no longer autocontrolled prop because we don't need in component's state.It uses an idea with
VirtualReference
fromreact-popper
, so we can can usecreateRef()
API from React and avoid double rendering as we don't need to storetarget
in components state more.Additional: fix Dropdown items' positioning
Also, these changes are needed for #1312 : to render dropdown items in the correct area based on align and placement props and Popper integration
What
true
on aDropdown
, then PopperJS does not render the items on first renderNote on alternative solution
The alternative would be to introduce logic to render the
Dropdown
items only when theDropdown
open flag istrue
; but this breaks accessibility concerns, as the list ofDropdown
items always needs to be open