Skip to content

Commit

Permalink
[Lens] [Inline editing] fix clip path cutting mobile view (#182376)
Browse files Browse the repository at this point in the history
## Summary

Fixes #182332

Fixes two problems:
1. clip-path used in eui flyout has to be overriden for mobile,
otherwise the content gets clipped and doesn't display properly.
2. pointer-events had to be set to none for the overlay and then set to
auto for the children to fix the second porblem.

Unfortunately I am not able to get rid of the layer Marco points out as
a problem because it's needed to display extra drop targets while also
allowing to scroll vertically:
<img width="1296" alt="Screenshot 2024-05-02 at 16 44 38"
src="https://github.com/elastic/kibana/assets/4283304/42bcbd98-d4c8-40ba-b0f5-7570f56264b1">
  • Loading branch information
mbondyra committed May 3, 2024
1 parent cdd0586 commit 50f9918
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/lens/public/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
display: flex;
flex-direction: column;
align-items: stretch;
clip-path: polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);
}

@keyframes euiFlyoutAnimation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,14 @@ export function LensEditConfigurationFlyout({
flex-direction: column;
}
.euiAccordion__childWrapper {
overflow-y: auto !important;
${euiScrollBarStyles(euiTheme)}
overflow-y: auto !important;
pointer-events: none;
padding-left: ${euiThemeVars.euiFormMaxWidth};
margin-left: -${euiThemeVars.euiFormMaxWidth};
> * {
pointer-events: auto;
}
.euiAccordion-isOpen & {
block-size: auto !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
@include euiFlyout;
// But with custom positioning to keep it within the sidebar contents
animation: euiFlyoutAnimation $euiAnimSpeedNormal $euiAnimSlightResistance;
left: 0;
max-width: none !important;
left: 0;
z-index: $euiZContentMenu;

@include euiBreakpoint('l', 'xl') {
@include euiBreakpoint('m', 'l', 'xl') {
height: 100% !important;
position: absolute;
top: 0 !important;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// styles needed to display extra drop targets that are outside of the config panel main area while also allowing to scroll vertically
.lnsConfigPanel__overlay {
clip-path: polygon(-100% 0, 100% 0, 100% 100%, -100% 100%);
@include euiBreakpoint('xs', 's', 'm') {
clip-path: none;
}
background: $euiColorLightestShade;
.kbnOverlayMountWrapper {
padding-left: $euiFormMaxWidth;
Expand Down

0 comments on commit 50f9918

Please sign in to comment.