Skip to content

Conversation

@squidfunk
Copy link
Contributor

Since the mkdocs theme updated to Bootstrap 5, jQuery is not necessary anymore. I've replaced all uses of jQuery with common browser APIs and adapted the use of the modals to Bootstrap 5. My testing shows that master behaves exactly as if this PR were merged. If not, please report errors here and I'll fix them.

I don't think jQuery can be removed from the readthedocs theme.

Closes #3648

@squidfunk
Copy link
Contributor Author

Side note: merging this PR will reduce the payload that the browser needs to download by 90kb (30kb gzipp'd), which is an improvement of -14% (currently 213kb gzipp'd). Thus, the MkDocs core theme should load faster!

Copy link
Member

@waylan waylan left a comment

Choose a reason for hiding this comment

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

Looks good to me. It is great to see this being worked on. I looked through the changes and they look good to me, but I'm weakest with JavaScript so I may have missed something.

@squidfunk
Copy link
Contributor Author

squidfunk commented Apr 18, 2024

Thanks for taking the time to look at this! ❤️

Do we want to release this with MkDocs 1.6.0, or afterwards? I've tested all that was apparent to me from reading the code and have found no problems (except for the visual regression mentioned in #3493 (comment), which are not related to the changes in this PR), but I'm also not a heavy user of the mkdocs theme.

If it should go into 1.6.0, we can merge it.

@waylan
Copy link
Member

waylan commented Apr 18, 2024

I would include this in 1.6.0 if we can.

@oprypin oprypin added this to the 1.6.0 milestone Apr 18, 2024
@oprypin oprypin linked an issue Apr 18, 2024 that may be closed by this pull request
@lovelydinosaur
Copy link
Member

I would include this in 1.6.0 if we can.

Seems reasonable. See also... #3648 (comment)

@squidfunk
Copy link
Contributor Author

Great! Since everybody seems to agree that we want this in 1.6.0, let's merge it.

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.

Remove jQuery dependency from mkdocs theme update all jquery usage to remove quarantining

5 participants