Skip to content

Commit

Permalink
[Security Solution][Admin][Policy] Fixes bug in policy details form w…
Browse files Browse the repository at this point in the history
…here sticky bottom bar hides the side nav bar (#161492)

## Summary

- [x] Fixes sticky bottom bar to go behind the side nav in policy
details
- [x] Adds functional test to ensure bug does not get reopened
##
BEFORE

![olm-bug-policy-details-bottom-bar](https://user-images.githubusercontent.com/56442535/217864225-77f025be-c158-4d01-96c2-e0c43afb23e4.gif)

AFTER

![image](https://github.com/elastic/kibana/assets/56409205/766f983a-d731-4dba-a0ea-96f384090cda)

![image](https://github.com/elastic/kibana/assets/56409205/1b078b1e-61d7-4227-b543-f92c58d79acd)

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
parkiino and kibanamachine authored Jul 10, 2023
1 parent 4439121 commit 57fa6ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
EuiButton,
EuiButtonEmpty,
EuiLoadingSpinner,
EuiBottomBar,
EuiSpacer,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
Expand All @@ -21,6 +20,7 @@ import { useDispatch } from 'react-redux';
import { useLocation } from 'react-router-dom';
import type { ApplicationStart } from '@kbn/core/public';
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
import { useShowEditableFormFields, usePolicyDetailsSelector } from '../../policy_hooks';
import {
policyDetails,
Expand Down Expand Up @@ -159,7 +159,7 @@ export const PolicyFormLayout = React.memo(() => {
)}
<PolicyDetailsForm />
<EuiSpacer size="xxl" />
<EuiBottomBar paddingSize="s">
<KibanaPageTemplate.BottomBar paddingSize="s">
<EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiButtonEmpty
Expand Down Expand Up @@ -190,7 +190,7 @@ export const PolicyFormLayout = React.memo(() => {
</EuiFlexItem>
)}
</EuiFlexGroup>
</EuiBottomBar>
</KibanaPageTemplate.BottomBar>
</>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
);
});

it('should not hide the side navigation', async () => {
await testSubjects.scrollIntoView('solutionSideNavItemLink-get_started');
// ensure center of button is visible and not hidden by sticky bottom bar
await testSubjects.click('solutionSideNavItemLink-administration', 1000, 15);
// test cleanup: go back to policy details page
await pageObjects.policy.navigateToPolicyDetails(policyInfo.packagePolicy.id);
});

it('and the show advanced settings button is clicked', async () => {
await testSubjects.missingOrFail('advancedPolicyPanel');

Expand Down

0 comments on commit 57fa6ae

Please sign in to comment.