-
Notifications
You must be signed in to change notification settings - Fork 840
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
Flyout component #227
Flyout component #227
Conversation
@cchaos Check this over for design beyond my todos. Only thing I'm wondering... should I put an X icon in the top right corner of these things? ESC closes them, and likely people would use these with action bars that had a close button, but I didn't know if I should add something like that. On one hand it makes sense, but it means i'd likely need to push the content in the header downa bit. |
82456cf
to
86c5ee4
Compare
86c5ee4
to
112dfd7
Compare
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.
LGTM. The escape key did not close the flyout for me in my plugin, but we can address that later.
src/components/flyout/_flyout.scss
Outdated
box-shadow: -$euiSizeXS 0px $euiSizeXS 0px rgba(0,0,0,.05); | ||
} | ||
|
||
$flyoutSizes: ( |
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.
$euiFlyoutSizes?
|
||
flex-grow: 1; | ||
overflow-y: auto; | ||
padding: $euiSize; |
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.
Can we increase the padding surrounding body, header, and footer at larger widths?
background: $euiColorLightestShade; | ||
flex-grow: 0; | ||
padding: $euiSize; | ||
border-top: $euiBorderThin; |
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.
Don't think a border necessary here.
flex-grow: 0; | ||
padding: $euiSize; | ||
padding-bottom: 0; | ||
box-shadow: 0 $euiSize $euiSize (-$euiSize / 2) $euiColorEmptyShade; |
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.
What's the box-shadow on the header for? I'm not seeing it visually.
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.
It gives a slight fade for the scroll to "shelf" the header.
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.
Ahh youp, I see
src/components/flyout/_flyout.scss
Outdated
@@ -44,11 +44,3 @@ $flyoutSizes: ( | |||
border-left: none; | |||
} | |||
} | |||
|
|||
@include screenXSmall { |
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.
@snide I think you meant to remove the screenSmall
selector instead?
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.
Lol. yeah!
border-left: $euiBorderThin; | ||
z-index: $euiZModal; | ||
background: $euiColorEmptyShade; | ||
animation: euiFlyout $euiAnimSpeedNormal $euiAnimSlightResistance; |
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.
Feels a bit quick to me for such a large sized component.
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.
I've done these kinds of systems before. We always had them slower, and then eventually sped them because they slowed down the work flow.
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.
I just mean a tad bit slower, not significantly. Also there isn't a closing animation. Is that on purpose?
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.
Our animation rules have generally been to immediately dismiss items on actions (like clicks), but use fades when they are done by the system (like a toast disappearing after a set time). Again, it's just to be snappy.
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.
Yeah I don't think I have a strong feeling either way.
src/components/flyout/_flyout.scss
Outdated
transform: translateX(100%); | ||
} | ||
100% { | ||
opacity: 1; |
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.
Because of the size, I think the opacity should get to the full 1 before it's completely in place. Like maybe at 70%?
src/components/flyout/_flyout.scss
Outdated
|
||
@each $name, $size in $flyoutSizes { | ||
.euiFlyout--#{$name} { | ||
width: $size; |
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.
I think the flyouts should also have a minimum width. This will ensure that on smaller screens (before it goes fullscreen) it will be an appropriate size.
src/components/flyout/_flyout.scss
Outdated
display: flex; | ||
flex-direction: column; | ||
align-items: strecth; | ||
box-shadow: -$euiSizeXS 0px $euiSizeXS 0px rgba(0,0,0,.05); |
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.
src/components/flyout/_flyout.scss
Outdated
animation: euiFlyout $euiAnimSpeedNormal $euiAnimSlightResistance; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: strecth; |
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.
spelling error: strecth -> stretch
OK. Got all the big issues and fixed some of the scrolling issues. Thanks to @cchaos for some mobile help. Gonna merge this in. Will make an issue for some other stuff we'd like to change (but aren't critical) |
Flyout component. Comes with props for
ownFocus
andsize
.Todo before merge
EuiModalOverlay
intoEuiOverlayMask
so its usage is more generic.Breaking change
EuiModalOverlay
is nowEuiOverlayMask
. It operates the same way. You only need to do a search / replace against the string to apply your patch.