-
Notifications
You must be signed in to change notification settings - Fork 3
Pure HTML widgets #458
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
Pure HTML widgets #458
Conversation
johnwalz97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great!
AnilSorathiya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
Fix warnings on some tests
PR SummaryThis PR overhauls the rendering layer within the project, transitioning from ipywidgets-based components to an HTML-based approach. The changes include:
The functional changes aim to improve compatibility (especially in environments like Google Colab), ease reproducibility of notebook outputs, and provide a more flexible, consistent integration of interactive content. Test Suggestions
|
Pull Request Description
What and why?
This PR introduces a new HTML-based rendering system that preserves interactive components (figures, tables, and progress bars) when notebooks are saved and reopened. This addresses a critical user experience issue where interactive Plotly charts and progress indicators were lost after saving notebooks.
Previously, ValidMind relied on
ipywidgetsfor interactive components, which had two major limitations:ipywidgetsadded unnecessary complexity and dependency management challengesSolution
We've implemented a self-contained HTML rendering system that:
Key Changes
New Components
StatefulHTMLRenderer- Core HTML rendering engine that generates self-contained HTML with embedded dataHTMLProgressBar- Progress bar implementation that persists state in saved notebooksTechnical Improvements
ipywidgetsdependency - Replaced with lightweight HTML/JavaScript solutionVALIDMIND_INTERACTIVE_FIGURESenvironment variable - Allows users to control interactive figure rendering (default: enabled)User Impact
Before
ipywidgetsinstallation for interactive featuresAfter
Testing
tests/test_results.pyMigration Notes
No migration required. Existing code will automatically benefit from the new HTML rendering system. Users can optionally disable interactive figures by setting
VALIDMIND_INTERACTIVE_FIGURES=false.How to test
Open and run existing notebooks.
What needs special review?
Dependencies, breaking changes, and deployment notes
Release notes
Upgraded HTML Rendering Engine
We've upgraded ValidMind's rendering engine to use a new HTML-based system that preserves interactive components when notebooks are saved.
Key improvements:
Upgrade
Optional: To disable interactive figures, set
VALIDMIND_INTERACTIVE_FIGURES=false(default: enabled).Checklist