-
-
Notifications
You must be signed in to change notification settings - Fork 710
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
Migrating HTML reprs to jinja2 #5188
Conversation
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.
FYI jinja is already a transitive dependency via bokeh. Bokeh, however, is currently an optional dependency so this would promote jinja to a must have. I'm not too worried about this, just wanted to highlight this.
Changes otherwise look good to me
Thanks for the review @jrbourbeau. This is now complete, all HTML reprs have been migrated. Ready for final review and merge. |
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.
Thanks @jacobtomlinson! This is in
This PR starts the task of migrating HTML reprs over to use Jinja2 templates instead of multiline strings. There should be no changes to the reprs themselves but they should be easier to create and more maintainable going forwards.
Before
Currently we construct HTML within Python strings
After
Instead we can use the new
distributed.widgets
submodule to render this from a template.And the template itself gets placed in
distributed/widgets/templates
and is much more readable.