This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Conversation
This file contains 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 #1471 +/- ##
==========================================
- Coverage 73.47% 73.46% -0.01%
==========================================
Files 807 806 -1
Lines 6088 6087 -1
Branches 1752 1800 +48
==========================================
- Hits 4473 4472 -1
+ Misses 1610 1609 -1
- Partials 5 6 +1
Continue to review full report at Codecov.
|
mnajdova
reviewed
Jun 7, 2019
closing for now as @layershifter will introduce a better solution |
4cfe0bc
to
0f9b1bf
Compare
in the end we need this PR, added few more changes |
8f592a6
to
d39a5e3
Compare
layershifter
approved these changes
Jun 10, 2019
d39a5e3
to
c8808cc
Compare
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.
feat(popup): unstable_pinned prop
Description
There are certain use cases where our users need to position
Popup
content orDropdown
items using a specific alignment and position (viaalign
andposition
props).By default,
Popup
content orDropdown
items reposition themselves automatically on both axis if the content / items do not fit in the viewport. However, the algorithm has a few issues, outlined in #1391 so this PR addresses that with a short term fix presented here:The short term fix is to add the
unstable_pinned
prop that disables automatic repositioning of the component; it will always be placed according to the values ofalign
andposition
props, regardless of the size of the component, the reference element or the viewport.e.g.
will create a
Popup
that will always be placed on top of the trigger aligned to the start (auto positioning will be turned off). Same applies forDropdown
.Screenshot outlining the difference in
Popup
: