[Enterprise Search] Fix beta notification in sidebar (#104763)

* Fix beta notification to use flex instead of absolute positioning

- probably should have done that from the start

* Remove now-unnecessary `betaNotification*` classes/wrappers
This commit is contained in:
Constance 2021-07-07 15:49:26 -07:00 committed by GitHub
parent 7af3be0655
commit dea450c5c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 19 deletions

View file

@ -7,18 +7,14 @@
@include euiBreakpoint('m', 'l', 'xl') {
.kbnPageTemplateSolutionNav {
position: relative;
min-height: 100%;
// Nested to override EUI specificity
.betaNotificationSideNavItem {
margin-top: $euiSizeL;
}
display: flex;
flex-direction: column;
}
.betaNotificationWrapper {
position: absolute;
bottom: 3px; // Without this 3px buffer, the popover won't render to the right
.euiSideNav__content {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
}

View file

@ -107,7 +107,6 @@ describe('appendBetaNotificationItem', () => {
{
id: 'beta',
name: '',
className: 'betaNotificationSideNavItem',
renderItem: expect.any(Function),
},
],
@ -118,7 +117,6 @@ describe('appendBetaNotificationItem', () => {
const SideNavItem = (mockSideNav.items[2] as any).renderItem;
const wrapper = shallow(<SideNavItem />);
expect(wrapper.hasClass('betaNotificationWrapper')).toBe(true);
expect(wrapper.find(BetaNotification)).toHaveLength(1);
});

View file

@ -98,12 +98,7 @@ export const appendBetaNotificationItem = (sideNav: KibanaPageTemplateProps['sol
sideNav.items.push({
id: 'beta',
name: '',
className: 'betaNotificationSideNavItem',
renderItem: () => (
<div className="betaNotificationWrapper">
<BetaNotification />
</div>
),
renderItem: () => <BetaNotification />,
});
}
};