Skip to content

Commit a8b2103

Browse files
cqliu1ryankeairnsMichaelMarcialis
authored
[Home] Elastic home page redesign (#70571) (#76030)
Co-authored-by: Catherine Liu <catherine.liu@elastic.co> Co-authored-by: Ryan Keairns <contactryank@gmail.com> Co-authored-by: Catherine Liu <catherineqliu@outlook.com> Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co> Co-authored-by: Ryan Keairns <contactryank@gmail.com> Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
1 parent 30fbb70 commit a8b2103

File tree

122 files changed

+4073
-2903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4073
-2903
lines changed

src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/public/chrome/ui/header/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function Header({
125125
<>
126126
<LoadingIndicator loadingCount$={observables.loadingCount$} />
127127
<header className={className} data-test-subj="headerGlobalNav">
128-
<EuiHeader position="fixed">
128+
<EuiHeader position="fixed" id="headerGlobalNav">
129129
<EuiHeaderSection grow={false}>
130130
{navType === 'modern' ? (
131131
<EuiHeaderSectionItem border="right" className="header__toggleNavButtonSection">

src/core/public/overlays/banners/_banners_list.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
}
44

55
.kbnGlobalBannerList__item + .kbnGlobalBannerList__item {
6-
margin-top: $euiSize;
6+
margin-top: $euiSizeS;
77
}

src/core/utils/default_app_categories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const DEFAULT_APP_CATEGORIES = Object.freeze({
4646
order: 3000,
4747
},
4848
security: {
49-
id: 'security',
49+
id: 'securitySolution',
5050
label: i18n.translate('core.ui.securityNavList.label', {
5151
defaultMessage: 'Security',
5252
}),

src/plugins/advanced_settings/kibana.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"server": true,
55
"ui": true,
66
"requiredPlugins": ["management"],
7-
"requiredBundles": ["kibanaReact"]
7+
"optionalPlugins": ["home"],
8+
"requiredBundles": ["kibanaReact", "home"]
89
}

src/plugins/advanced_settings/public/management_app/advanced_settings.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ export class AdvancedSettingsComponent extends Component<
114114
filteredSettings: this.mapSettings(Query.execute(query, this.settings)),
115115
});
116116
});
117+
118+
// scrolls to setting provided in the URL hash
119+
const { hash } = window.location;
120+
if (hash !== '') {
121+
setTimeout(() => {
122+
const id = hash.replace('#', '');
123+
const element = document.getElementById(id);
124+
const globalNavOffset = document.getElementById('headerGlobalNav')?.offsetHeight || 0;
125+
126+
if (element) {
127+
element.scrollIntoView();
128+
window.scrollBy(0, -globalNavOffset); // offsets scroll by height of the global nav
129+
}
130+
}, 0);
131+
}
117132
}
118133

119134
componentWillUnmount() {

0 commit comments

Comments
 (0)