html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/5880#issuecomment-977707536,https://api.github.com/repos/pydata/xarray/issues/5880,977707536,IC_kwDOAMm_X846RqIQ,4160723,2021-11-24T09:45:37Z,2021-11-24T09:45:37Z,MEMBER,"Thanks @mlhenderson! > Longer-term, embedding html/css may not be the way to go, but I think that falls outside the scope of this PR. We can arrange to chat with some Jupyter devs if there is interest in a discussion about longer-term solutions for the rendering in notebooks and/or JupyterLab, just let me know if you want to do that. @benbovy Yeah, now that (since v3) Jupyterlab extensions can simply be installed using conda or pip, we may consider eventually porting this rich-repr feature into a lightweight extension instead. That would be a more robust and extensible solution. The main problem, however, is how to support the variety of notebook front-ends. There seems to be a recent agreement on refactoring Jupyter ""official"" front-ends (e.g., ""classic"" notebook) so that they all use Jupyterlab's current machinery, which will certainly help here. Not sure for the other front-ends (e.g., VSCode, GitHub, GitLab, Sphinx themes, etc.), though. Maybe we could have three repr alternatives: - The full-featured, interactive version: compatible with all official Jupyter front-ends, maintained in a 3rd-party Jupyter extension - A basic, html-based version (as fallback): less interactive but should work (and be nicely integrated) with all notebook front-ends without relying on ugly hacks (no css, just basic html tags) - The plain text version I agree that it would be worth discussing this general issue with Jupyter devs. There's more and more projects in the Python/PyData ecosystem that provide advanced, html-based reprs. ","{""total_count"": 2, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 1}",,1031724989 https://github.com/pydata/xarray/pull/5880#issuecomment-950769747,https://api.github.com/repos/pydata/xarray/issues/5880,950769747,IC_kwDOAMm_X844q5hT,4160723,2021-10-25T10:24:02Z,2021-10-25T10:24:02Z,MEMBER,"Thanks @mlhenderson for submitting this PR! It looks good to me, I prefer this inline CSS workaround than the (very hacky) `hidden` HTML attribute workaround. My only concern is: are we sure that inline CSS won't get stripped out too in notebook front-ends in the future? (in which case the `hidden` solution will still work, unless it also gets removed like for GitHub's notebook renderer). > Not sure why this fix was implemented in sphinx-book-theme and not in xarray directly... It guess it depends on which order Xarray's vs. Bootstrap's vs. Sphinx-Book's CSS is injected. Not sure about the actual order.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1031724989