home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "MEMBER" and issue = 1031724989 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 3

  • benbovy 2
  • max-sixty 2
  • andersy005 1

issue 1

  • Alternate method using inline css to hide regular html output in an untrusted notebook · 5 ✖

author_association 1

  • MEMBER · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
977707536 https://github.com/pydata/xarray/pull/5880#issuecomment-977707536 https://api.github.com/repos/pydata/xarray/issues/5880 IC_kwDOAMm_X846RqIQ benbovy 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
}
  Alternate method using inline css to hide regular html output in an untrusted notebook 1031724989
967784333 https://github.com/pydata/xarray/pull/5880#issuecomment-967784333 https://api.github.com/repos/pydata/xarray/issues/5880 IC_kwDOAMm_X845rzeN max-sixty 5635139 2021-11-13T05:16:44Z 2021-11-13T05:16:44Z MEMBER

Many thanks for your thoughtful reply @mlhenderson . It seems like the proposed code is better than the current code, so I would suggest we merge, and we can iterate further if others have thoughts.

And thanks for your first contribution !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternate method using inline css to hide regular html output in an untrusted notebook 1031724989
967701381 https://github.com/pydata/xarray/pull/5880#issuecomment-967701381 https://api.github.com/repos/pydata/xarray/issues/5880 IC_kwDOAMm_X845rfOF max-sixty 5635139 2021-11-12T22:26:40Z 2021-11-12T22:26:40Z MEMBER

Hi @mlhenderson — I don't know this well — if you are confident that @benbovy 's concern is not pressing, then we could merge? (unless @benbovy you are confident that it is a concern!)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternate method using inline css to hide regular html output in an untrusted notebook 1031724989
950769747 https://github.com/pydata/xarray/pull/5880#issuecomment-950769747 https://api.github.com/repos/pydata/xarray/issues/5880 IC_kwDOAMm_X844q5hT benbovy 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
}
  Alternate method using inline css to hide regular html output in an untrusted notebook 1031724989
948210349 https://github.com/pydata/xarray/pull/5880#issuecomment-948210349 https://api.github.com/repos/pydata/xarray/issues/5880 IC_kwDOAMm_X844hIqt andersy005 13301940 2021-10-21T03:00:10Z 2021-10-21T03:02:51Z MEMBER

Thank you for working on this, @mlhenderson! Seems there have been attempts at fixing this issue before

  • https://github.com/pydata/xarray/pull/4053
  • https://github.com/executablebooks/sphinx-book-theme/issues/238#issuecomment-714784321 which suggests using the .xr-wrap { display: block !important }. Not sure why this fix was implemented in sphinx-book-theme and not in xarray directly...

Ccing @benbovy who wrote the HTML repr in case he has any feedback.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternate method using inline css to hide regular html output in an untrusted notebook 1031724989

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 880.936ms · About: xarray-datasette