Skip to content

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Feb 18, 2025

Changes

Put the script for the navigation directly under it's DOM element. Hence, it should be loaded and executed before the rest of the content is loaded.

Notes

Not sure if there is an actual performance gain. But I would like to see the effect in elastic/docs-content

@reakaleek reakaleek requested a review from a team February 18, 2025 15:48
@reakaleek reakaleek self-assigned this Feb 18, 2025
import {initTabs} from "./tabs";
import {initCopyButton} from "./copybutton";

initNav();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this still be called? I don't see changes to pages-nav.ts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 😅

08424f7

@reakaleek reakaleek requested a review from Mpdreamz February 18, 2025 15:58
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Mpdreamz Mpdreamz merged commit 3a5b46e into main Feb 18, 2025
5 checks passed
@Mpdreamz Mpdreamz deleted the feature/optimize-nav branch February 18, 2025 17:09
@Mpdreamz
Copy link
Member

Merging this as I am playing with caching the navigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants