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

Backport "Optimize the documentation JS files" to LTS #21029

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #20075 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

This PR optimizes the three files in the `/docs/_assets/js` directory
for performance.

In `toolbar.js`, jQuery selectors have been cached as variables to
prevent constant calls to the DOM.
In `sidebar.js`, the multiple `toggleClass(...).toggleClass(...)` have
been merged into one
In `api-search.js`:
- Defined functions have been switched to newer ES format (`const myFunc
= () => {}`)
- JSON has been switched to **JS**ON (`{"key":"value"}` ->
`{key:"value"}`)
[Cherry-picked fa2f7bf]
Base automatically changed from lts-19697 to lts-3.3 July 5, 2024 13:23
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-20295.

Reference

@WojciechMazur WojciechMazur merged commit 71f3a32 into lts-3.3 Jul 5, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the lts-20075 branch July 5, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants