Skip to content
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

Fix EuiBottomBar in serverless #166840

Merged
merged 12 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const ProjectNavigation: React.FC = ({ children }) => {

return (
<EuiCollapsibleNavBeta
data-test-subj="projectLayoutSideNav"
initialIsCollapsed={isCollapsed}
onCollapseToggle={onCollapseToggle}
css={isCollapsed ? { display: 'none;' } : {}}
Expand Down
4 changes: 4 additions & 0 deletions src/core/public/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
margin-left: 320px; // Hard-coded for now -- @cchaos
}

.euiBody--hasFlyout[style*='padding-left: 248px'] .euiBottomBar {
margin-left: 248px; // Hard-coded for serverless sideNav
}
nchaulet marked this conversation as resolved.
Show resolved Hide resolved

// Temporary fix for EuiPageHeader with a bottom border but no tabs or padding
// Will fix in EUI -- @cchaos
.euiPageHeader--bottomBorder:not(.euiPageHeader--tabsAtBottom):not([class*='euiPageHeader--padding']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import expect from 'expect';
import { FtrProviderContext } from '../ftr_provider_context';

export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProviderContext) {
Expand Down Expand Up @@ -100,6 +101,12 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide
await testSubjects.existOrFail('kibanaProjectHeader');
},

async assertNavExistsWithFixedSize() {
const res = await testSubjects.find('projectLayoutSideNav');
// EuiBottomBar expect side nav to be 248px if this change we may have to update src/core/public/styles/_base.scss
expect((await res.getSize()).width).toBe(248);
},

async clickUserAvatar() {
testSubjects.click('userMenuAvatar');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await svlCommonNavigation.navigateToKibanaHome();
await svlCommonPage.assertProjectHeaderExists();
});

it('has nav with fixed size', async () => {
await svlCommonNavigation.navigateToKibanaHome();
await svlCommonPage.assertNavExistsWithFixedSize();
});
});
}