-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Issue Summary
jQuery and jQuery UI were removed from the codebase as they are not being used anywhere and modern JupyterLab (v4+) does not require them. This issue tracks validation of JupyterLab functionality and addresses module coupling concerns.
Removed Code
1. packages/app-frontend/index.html (lines 18-26)
Removed jQuery and jQuery UI scripts:
<!-- jQuery with Subresource Integrity (SRI) for security -->
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha384-1H217gwSVyLSIfaLxHbE7dRb3v4mYCKbpQvzx0cegeju1MVsGrX5xXxAvs/HgeFs"
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"
integrity="sha384-4D3G3GikQs6hLlLZGdz5wLFzuqE9v4yVdQSKET/X8qPkMqBa0E3x6Fm6KjLfLCBN"
crossorigin="anonymous"></script>Reason for removal: No jQuery usage found in any TypeScript/JavaScript files, not in package.json dependencies, and modern JupyterLab packages don't require it.
2. packages/modules/jupyter/.storybook/preview-head.html (lines 6-7)
Removed jQuery scripts:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script>Tasks
- Test JupyterLab module functionality without jQuery
- Test Jupyter notebook cells rendering
- Test Jupyter kernel operations
- Test Jupyter terminal functionality
- Test IPywidgets (if used)
- Test any custom JavaScript in notebooks
- If JupyterLab fails, investigate which component needs jQuery and find modern alternatives
- Test Storybook stories for Jupyter module
Module Coupling Issue
Problem: The main application HTML (packages/app-frontend/index.html) contains Jupyter-specific configuration:
<script id="jupyter-config-data" type="application/json">
{
"terminalsAvailable": true
}
</script>Why this is bad:
- Breaks module self-containedness
- The main SPA application shouldn't have module-specific configuration hardcoded
- Makes it harder to make the Jupyter module truly optional
- Couples the frontend build to a specific module
- Ugly design pattern - adding module-specific config in the main SPA app
Recommendation:
This configuration should be:
- Moved into the Jupyter module itself
- Dynamically injected when the Jupyter module loads
- Or configured via the module system rather than hardcoded in the HTML
This would allow proper separation of concerns and make modules truly independent.
Benefits of jQuery Removal
- Reduces page weight by ~100KB (minified)
- One less security surface to maintain
- No need to track jQuery CVEs or update SRI hashes
- Cleaner, more modern codebase
Related
- Security fix PR that added SRI hashes to jQuery (which can now be removed)
- General code scanning security improvements
Reactions are currently unavailable