mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[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:
parent
7af3be0655
commit
dea450c5c4
3 changed files with 8 additions and 19 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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 />,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue