home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where user = 475613 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • Add support for Jinja2 version 3.0 3
  • JavaScript plugin hooks mechanism similar to pluggy 1
  • JavaScript to help plugins interact with the fragment part of the URL 1

user 1

  • MarkusH · 5 ✖

author_association 1

  • NONE 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
844970776 https://github.com/simonw/datasette/issues/1331#issuecomment-844970776 https://api.github.com/repos/simonw/datasette/issues/1331 MDEyOklzc3VlQ29tbWVudDg0NDk3MDc3Ng== MarkusH 475613 2021-05-20T10:40:25Z 2021-05-20T10:40:25Z NONE

Any chance you could push a new datasette release with the updated dependencies in the setup.py, @simonw?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add support for Jinja2 version 3.0 893537744  
842499728 https://github.com/simonw/datasette/issues/1331#issuecomment-842499728 https://api.github.com/repos/simonw/datasette/issues/1331 MDEyOklzc3VlQ29tbWVudDg0MjQ5OTcyOA== MarkusH 475613 2021-05-17T17:24:30Z 2021-05-17T17:24:30Z NONE

I wonder if there are any new 3.0 features we should be taking advantage of here that would justify pinning to 3.0 minimum?

The changelog reads like bug fixes and removal of deprecated parts to me

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add support for Jinja2 version 3.0 893537744  
842495820 https://github.com/simonw/datasette/issues/1331#issuecomment-842495820 https://api.github.com/repos/simonw/datasette/issues/1331 MDEyOklzc3VlQ29tbWVudDg0MjQ5NTgyMA== MarkusH 475613 2021-05-17T17:18:05Z 2021-05-17T17:18:05Z NONE

Wow, you are fast!

I didn't notice dependabot had opened a PR already. I was about to.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add support for Jinja2 version 3.0 893537744  
753600999 https://github.com/simonw/datasette/issues/983#issuecomment-753600999 https://api.github.com/repos/simonw/datasette/issues/983 MDEyOklzc3VlQ29tbWVudDc1MzYwMDk5OQ== MarkusH 475613 2021-01-03T11:11:21Z 2021-01-03T11:11:21Z NONE

With regards to JS/Browser events, given your example of menu items that plugins could add, I could imagine this code to work:

``js // as part of datasette datasette.events.AddMenuItem = 'DatasetteAddMenuItemEvent'; document.addEventListener(datasette.events.AddMenuItem, (e) => { // do whatever is needed to add the menu item. Data comes frome` alert(e.title + ' ' + e.link); });

// as part of a plugin const event = new Event(datasette.events.AddMenuItem, {link: '/foo/bar', title: 'Go somewhere'}); Document.dispatchEvent(event) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
JavaScript plugin hooks mechanism similar to pluggy 712260429  
744489028 https://github.com/simonw/datasette/issues/1144#issuecomment-744489028 https://api.github.com/repos/simonw/datasette/issues/1144 MDEyOklzc3VlQ29tbWVudDc0NDQ4OTAyOA== MarkusH 475613 2020-12-14T14:47:11Z 2020-12-14T14:47:11Z NONE

Thanks for opening the issue, @simonw. Let me elaborate on my Tweets.

datasette-chartjs provides drop down lists to pick the chart visualization (e.g. bar, line, doughnut, pie, ...) as well as the column used for the "x axis" (e.g. time).

A user can change the values on-demand. The chart will be redrawn w/o querying the database again.

However, if a user wants to change the underlying query, they will use the SQL field provided by datasette or any of the other datasette built-in features to amend a query. In order to maintain a user's selections for the plugin, datasette-chartjs copies some parts of datasette-vega which persist the chosen visualization and column in the hash part of a URL (the stuff behind the #). The plugin load the config from the hash upon initialization on the next page and use it accordingly.

Additionally, datasette-vega and datasette-chartjs need to make sure to include the hash in all links and forms that cause a reload of the page. This is, such that the config persists between clicks.

This ticket is about moving thes parts into datasette that provide the functionality to do so. This includes:

  1. a way to load config options with a given prefix from the current URL hash
  2. a way to update the current URL hash with a new config value or a bunch of config options
  3. updating all necessary links and forms on the current page to include the URL hash whenever its updated
  4. to prevent leaking config options to external pages, only "internal" links should be updated

There's another, optional, feature that we might want to think about during the design phase: the scope of the config. Links within a datasette instance have 1 of 3 scopes:

  1. global, for the whole datasette project
  2. database, for all tables in a database
  3. table, only for a table within a database

When updating the links and forms as pointed out in 3. above, it might be worth considering which links need to be updated. I could imagine a plugin that wants to persist some setting across all tables within a database but another setting only within a table.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
JavaScript to help plugins interact with the fragment part of the URL 765637324  

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