Skip to content

Commit

Permalink
[Home] Elastic home page redesign (#70571) (#76030)
Browse files Browse the repository at this point in the history
Co-authored-by: Catherine Liu <[email protected]>
Co-authored-by: Ryan Keairns <[email protected]>
Co-authored-by: Catherine Liu <[email protected]>
Co-authored-by: Michael Marcialis <[email protected]>

Co-authored-by: Ryan Keairns <[email protected]>
Co-authored-by: Michael Marcialis <[email protected]>
  • Loading branch information
3 people authored Aug 26, 2020
1 parent 30fbb70 commit a8b2103
Show file tree
Hide file tree
Showing 122 changed files with 4,073 additions and 2,903 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function Header({
<>
<LoadingIndicator loadingCount$={observables.loadingCount$} />
<header className={className} data-test-subj="headerGlobalNav">
<EuiHeader position="fixed">
<EuiHeader position="fixed" id="headerGlobalNav">
<EuiHeaderSection grow={false}>
{navType === 'modern' ? (
<EuiHeaderSectionItem border="right" className="header__toggleNavButtonSection">
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/overlays/banners/_banners_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
}

.kbnGlobalBannerList__item + .kbnGlobalBannerList__item {
margin-top: $euiSize;
margin-top: $euiSizeS;
}
2 changes: 1 addition & 1 deletion src/core/utils/default_app_categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DEFAULT_APP_CATEGORIES = Object.freeze({
order: 3000,
},
security: {
id: 'security',
id: 'securitySolution',
label: i18n.translate('core.ui.securityNavList.label', {
defaultMessage: 'Security',
}),
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/advanced_settings/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"server": true,
"ui": true,
"requiredPlugins": ["management"],
"requiredBundles": ["kibanaReact"]
"optionalPlugins": ["home"],
"requiredBundles": ["kibanaReact", "home"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ export class AdvancedSettingsComponent extends Component<
filteredSettings: this.mapSettings(Query.execute(query, this.settings)),
});
});

// scrolls to setting provided in the URL hash
const { hash } = window.location;
if (hash !== '') {
setTimeout(() => {
const id = hash.replace('#', '');
const element = document.getElementById(id);
const globalNavOffset = document.getElementById('headerGlobalNav')?.offsetHeight || 0;

if (element) {
element.scrollIntoView();
window.scrollBy(0, -globalNavOffset); // offsets scroll by height of the global nav
}
}, 0);
}
}

componentWillUnmount() {
Expand Down
Loading

0 comments on commit a8b2103

Please sign in to comment.