home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where author_association = "OWNER", issue = 573755726 and user = 9599 sorted by updated_at descending

✖
✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

user 1

  • simonw · 11 ✖

issue 1

  • Mechanism for plugins to add action menu items for various things · 11 ✖

author_association 1

  • OWNER · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
719195346 https://github.com/simonw/datasette/issues/690#issuecomment-719195346 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcxOTE5NTM0Ng== simonw 9599 2020-10-30T05:20:42Z 2020-10-30T05:20:42Z OWNER

I've now added two new plugin hooks: menu_links() and table_actions().

I'm going to close this issue. Further work (on column actions and and database actions) can happen in separate tickets, but I won't include them in Datasette 0.51 since they're much less interesting than table and instance actions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
709497595 https://github.com/simonw/datasette/issues/690#issuecomment-709497595 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcwOTQ5NzU5NQ== simonw 9599 2020-10-15T18:04:35Z 2020-10-15T18:12:15Z OWNER

For the table actions: attaching it to a cog icon next to the table name could make sense.

This is the column action icon at twice the size, color #666.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
709500715 https://github.com/simonw/datasette/issues/690#issuecomment-709500715 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcwOTUwMDcxNQ== simonw 9599 2020-10-15T18:10:32Z 2020-10-15T18:10:32Z OWNER

Row action menus are a question mark for me. Adding them to the table page itself could get really noisy - though maybe they're a vertical ... menu at the end of the row? They could also go on the row.html template, though that page is rarely used at the moment.

I'm going to skip row actions for the moment and concentrate on the other four, which I know I have use-cases for.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
709499944 https://github.com/simonw/datasette/issues/690#issuecomment-709499944 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcwOTQ5OTk0NA== simonw 9599 2020-10-15T18:09:06Z 2020-10-15T18:09:06Z OWNER

I'm going to dedicate this issue to thinking about action menus. #981 added column action menus, others to build could be:

  • Table action menus (for things like configure FTS, edit schema)
  • Database action menus (import CSV file into this table)
  • Instance action menus (manage users, import CSV into this instance)
  • Column action menus (already there, plugins could include extract this column)
  • Row action menus?
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
709498425 https://github.com/simonw/datasette/issues/690#issuecomment-709498425 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcwOTQ5ODQyNQ== simonw 9599 2020-10-15T18:06:08Z 2020-10-15T18:06:08Z OWNER

And for instance-level actions (linking to datasette-import-csv for example) an actions menu anchored against a burger-bar menu icon in the navigation bar.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
706845950 https://github.com/simonw/datasette/issues/690#issuecomment-706845950 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDcwNjg0NTk1MA== simonw 9599 2020-10-12T04:07:28Z 2020-10-12T04:07:28Z OWNER

Next step is to design where these will go and what they will look like - in particular the navigation links that lead to plugins such as datasette-upload-csvs and datasette-configure-fts and datasette-edit-schema.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
644987083 https://github.com/simonw/datasette/issues/690#issuecomment-644987083 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDY0NDk4NzA4Mw== simonw 9599 2020-06-16T20:11:35Z 2020-06-16T20:11:35Z OWNER

Twitter conversation about drop-down menu solutions that are accessible, fast loading and use minimal JavaScript: https://twitter.com/simonw/status/1272974294545395712

I really like the approach taken by GitHub Primer, which builds on top of HTML <summary> <details> tags: https://primer.style/css/components/dropdown

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
596296955 https://github.com/simonw/datasette/issues/690#issuecomment-596296955 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDU5NjI5Njk1NQ== simonw 9599 2020-03-09T01:49:19Z 2020-03-09T01:49:19Z OWNER

Once I've defined what these are they can be implemented using the existing pluggy mechanism.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
596296745 https://github.com/simonw/datasette/issues/690#issuecomment-596296745 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDU5NjI5Njc0NQ== simonw 9599 2020-03-09T01:48:04Z 2020-03-09T01:48:53Z OWNER

Maybe there are a few things here: * A mechanism for adding actions - essentially menu items - to tables and rows and queries and the index page * A way of defining blocks on the page where a plugin can add an entire block of custom HTML - above and below the table, or at the top of the index page for example.

Anything fancier than this can be achieved using JavaScript - provided there are documented blocks with IDs that JavaScript code can then manipulate in sensible ways.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
596275489 https://github.com/simonw/datasette/issues/690#issuecomment-596275489 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDU5NjI3NTQ4OQ== simonw 9599 2020-03-09T00:55:29Z 2020-03-09T00:55:29Z OWNER

I just hacked around this again in datasette-search-all, which abuses the description_source_license block to add a search for to the top of the index.html template: https://github.com/simonw/datasette-search-all/blob/f9b2a9c3328f35021a4744205d862c108f8f08eb/datasette_search_all/templates/index.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  
593247614 https://github.com/simonw/datasette/issues/690#issuecomment-593247614 https://api.github.com/repos/simonw/datasette/issues/690 MDEyOklzc3VlQ29tbWVudDU5MzI0NzYxNA== simonw 9599 2020-03-02T06:49:12Z 2020-03-02T06:49:12Z OWNER

The answer may lie in a plugin hook which returns a list of HTML fragments to be added to the page in a particular place.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for plugins to add action menu items for various things 573755726  

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 1432.995ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows