home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where issue = 787098345 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • simonw 10
  • brandonrobertz 1
  • asg017 1

author_association 2

  • OWNER 10
  • CONTRIBUTOR 2

issue 1

  • Ability for plugins to collaborate when adding extra HTML to blocks in default templates · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1722845490 https://github.com/simonw/datasette/issues/1191#issuecomment-1722845490 https://api.github.com/repos/simonw/datasette/issues/1191 IC_kwDOBm6k_c5msIky asg017 15178711 2023-09-18T06:55:52Z 2023-09-18T06:55:52Z CONTRIBUTOR

One note here: this feature could be called "slots", similar to Layout Slots in Vitepress.

In Vitepress, you can add custom components/widget/gadgets into determined named "slots", like so:

doc-top doc-bottom doc-footer-before doc-before doc-after ...

Would be great to do in both Python and Javascript, with the upcoming JavaScript API #2052. In datasette-write-ui, all we do is add a few "Insert row" and "edit this row" buttons and that required completely capturing the table.html template, which isn't great for other plugins. But having "slots" like table-footer-before or table-row-id or something would be great to work with.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
1200732975 https://github.com/simonw/datasette/issues/1191#issuecomment-1200732975 https://api.github.com/repos/simonw/datasette/issues/1191 IC_kwDOBm6k_c5Hkbsv brandonrobertz 2670795 2022-08-01T05:39:27Z 2022-08-01T05:39:27Z CONTRIBUTOR

I've got a URL shortening plugin that I would like to embed on the query page but I'd like avoid capturing the entire query.html template. A feature like this would solve it. Where's this at and how can I help?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761104933 https://github.com/simonw/datasette/issues/1191#issuecomment-761104933 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTEwNDkzMw== simonw 9599 2021-01-15T18:21:26Z 2021-12-17T07:03:02Z OWNER

Also related: #857 (comprehensive documentation of variables available to templates) - since then the plugin hook could be fed the full template context and use that to do its thing.

Or maybe the plugin hooks gets to return the name of a template that should be {% include %} into the page at that point? But the plugin may want to add extra context that is available to that template include.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
766524016 https://github.com/simonw/datasette/issues/1191#issuecomment-766524016 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2NjUyNDAxNg== simonw 9599 2021-01-25T03:59:17Z 2021-01-25T03:59:17Z OWNER

More work can happen in the PR: #1204

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
766523866 https://github.com/simonw/datasette/issues/1191#issuecomment-766523866 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2NjUyMzg2Ng== simonw 9599 2021-01-25T03:58:34Z 2021-01-25T03:58:34Z OWNER

I've got a good prototype working now, but I'm dropping this from the Datasette 0.54 milestone because it requires a bunch of additional work to make sure it is really well tested and documented.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
766466030 https://github.com/simonw/datasette/issues/1191#issuecomment-766466030 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2NjQ2NjAzMA== simonw 9599 2021-01-25T00:11:04Z 2021-01-25T00:11:04Z OWNER

I can combine this with #987 - each of these areas of the page can be wrapped in a <div> with a class that matches the name of the plugin hook, that way JavaScript plugins can append their content in the same place as Python plugins.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
765757433 https://github.com/simonw/datasette/issues/1191#issuecomment-765757433 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2NTc1NzQzMw== simonw 9599 2021-01-22T23:43:43Z 2021-01-22T23:43:43Z OWNER

Another potential use for this: plugins that provide authentication (like datasette-auth-passwords and datasette-auth-github) could use it to add a chunk of HTML to the "permission denied" page that links to their mechanism of authenticating.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761705076 https://github.com/simonw/datasette/issues/1191#issuecomment-761705076 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTcwNTA3Ng== simonw 9599 2021-01-17T00:35:13Z 2021-01-17T00:37:51Z OWNER

I'm going to try using Jinja macros to implement this: https://jinja.palletsprojects.com/en/2.11.x/templates/#macros

Maybe using one of these tricks to auto-load the macro? http://codyaray.com/2015/05/auto-load-jinja2-macros

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761703368 https://github.com/simonw/datasette/issues/1191#issuecomment-761703368 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTcwMzM2OA== simonw 9599 2021-01-17T00:22:46Z 2021-01-17T00:22:46Z OWNER

I'm going to prototype this in a branch.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761703232 https://github.com/simonw/datasette/issues/1191#issuecomment-761703232 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTcwMzIzMg== simonw 9599 2021-01-17T00:21:31Z 2021-01-17T00:21:54Z OWNER

I think this ends up being a whole collection of new plugin hooks, something like:

  • include_table_top
  • include_table_bottom
  • include_row_top
  • include_row_bottom
  • include_database_top
  • include_database_bottom
  • include_query_bottom
  • include_query_bottom
  • include_index_bottom
  • include_index_bottom
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761703022 https://github.com/simonw/datasette/issues/1191#issuecomment-761703022 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTcwMzAyMg== simonw 9599 2021-01-17T00:20:00Z 2021-01-17T00:20:00Z OWNER

Plugins that want to provide extra context to the template can already do so using the extra_template_vars() plugin hook.

So this hook could work by returning a list of template filenames to be included. Those templates can be bundled with the plugin. Since they are included they will have access to the template context and to any extra_template_vars() values.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  
761103910 https://github.com/simonw/datasette/issues/1191#issuecomment-761103910 https://api.github.com/repos/simonw/datasette/issues/1191 MDEyOklzc3VlQ29tbWVudDc2MTEwMzkxMA== simonw 9599 2021-01-15T18:19:29Z 2021-01-15T18:19:29Z OWNER

This relates to #987 (documented HTML hooks for JavaScript plugins) but is not quite the same thing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability for plugins to collaborate when adding extra HTML to blocks in default templates 787098345  

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,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
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 47.163ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows