-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add HTML Renderer #488
Add HTML Renderer #488
Conversation
Bot update galata references |
Out of curiosity, how do you think about security with allowing users to input raw HTML? Are you thinking about any type of disclaimers? |
The bot does not seem obedient https://github.com/bloomberg/ipydatagrid/actions/runs/8204278156/job/22438628744 ...
I guess it would be fair to say that we are not far from the HTML widget situation in ipywidgets. Users can technically already output any HTML they want in the Jupyter notebook. I can also think of the |
2a43b17
to
66ae40d
Compare
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 all looks great! Thanks!
I see one tiny issue, when resizing the column that contains HTML, the HTML content stretches or shrinks weirdly:
Screencast.from.2024-03-20.15-45-51.webm
I suppose that because your HTML content depends entirely on the cell size, we should invalidate the cache as soon as the cell is not the same size. Right now your cache depends only on the cell content, not the cell size.
I'm not sure making the cache dependent on the cell size is the way to go though. Probably let's not cache anything at all?
Signed-off-by: gjmooney <gjmooney@asu.edu>
Signed-off-by: gjmooney <gjmooney@asu.edu>
Signed-off-by: gjmooney <gjmooney@asu.edu>
9293799
to
4d495ff
Compare
Signed-off-by: gjmooney <gjmooney@asu.edu>
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!!
Describe your changes
Adds an HTML renderer. Users can input HTML strings as the value of the cell and the output will be rendered HTML.
Testing performed
Manual testing and added visual regression tests