-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Anchor] Support left / right direction (pt. 4 - add horizontal placement prop on Popover) #393
Merged
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 @@
## develop #393 +/- ##
===========================================
+ Coverage 88.45% 88.46% +0.01%
===========================================
Files 151 151
Lines 1533 1535 +2
Branches 278 280 +2
===========================================
+ Hits 1356 1358 +2
Misses 177 177
|
2 tasks
chenesan
force-pushed
the
feature/add_right_placement_strategy_pt1
branch
from
October 26, 2022 04:09
02862ff
to
5e84517
Compare
chenesan
force-pushed
the
feature/add_right_placement_strategy_pt2
branch
from
October 26, 2022 04:09
ca04bdc
to
26653f4
Compare
chenesan
force-pushed
the
feature/add_right_placement_strategy_pt2
branch
from
October 26, 2022 07:46
26653f4
to
25447fd
Compare
chenesan
commented
Oct 26, 2022
@@ -48,7 +49,11 @@ function Popover({ | |||
* The `maxHeight` is for `BEM.container`, which doesn't include root class padding. | |||
* So we need to minus POPOVER_PADDING here. | |||
*/ | |||
const maxHeight = remainingSpace ? remainingSpace - POPOVER_PADDING : undefined; | |||
const maxHeight = ( | |||
(remainingSpace && verticalPlacements.includes(placement)) |
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.
置左 / 右時就不需要指定 max-height 了
zhusee2
approved these changes
Oct 26, 2022
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.
讚讚
leannechen
approved these changes
Oct 27, 2022
Base automatically changed from
feature/add_right_placement_strategy_pt1
to
develop
October 27, 2022 08:40
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
讓 popover 可以套用 left / right 的 placement,並加入 anchored right popover 的 story。
Changes
Risk
Usually none, if you have any please write it here.
TODOs