issue_comments
8,883 rows where user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
user 1
- simonw · 4,354 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
753653260 | https://github.com/simonw/datasette/issues/1169#issuecomment-753653260 | https://api.github.com/repos/simonw/datasette/issues/1169 | MDEyOklzc3VlQ29tbWVudDc1MzY1MzI2MA== | simonw 9599 | 2021-01-03T17:54:40Z | 2021-01-03T17:54:40Z | OWNER | And @benpickles yes I would land that pull request straight away as-is. Thanks! |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Prettier package not actually being cached 777677671 | |
753653033 | https://github.com/simonw/datasette/issues/1169#issuecomment-753653033 | https://api.github.com/repos/simonw/datasette/issues/1169 | MDEyOklzc3VlQ29tbWVudDc1MzY1MzAzMw== | simonw 9599 | 2021-01-03T17:52:53Z | 2021-01-03T17:52:53Z | OWNER | Oh that's so frustrating! I was worried about that - I spotted a few runs that seemed faster and hoped that it meant that the package was coming out of the You've convinced me that Datasette itself should have a But... I'd really love to figure out a general pattern for using Any ideas? The best I can think of is for the workflow itself to write out a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Prettier package not actually being cached 777677671 | |
753570710 | https://github.com/simonw/datasette/issues/983#issuecomment-753570710 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzU3MDcxMA== | simonw 9599 | 2021-01-03T05:29:56Z | 2021-01-03T05:29:56Z | OWNER | I thought about using browser events, but they don't quite match the API that I'm looking to provide. In particular, the great thing about Pluggy is that if you have multiple handlers registered for a specific plugin hook each of those handlers can return a value, and Pluggy will combine those values into a list of replies. This is great for things like plugin hooks that add extra menu items - each plugin can return a menu item (maybe as a label/URL/click-callback object) and the calling code can then add all of those items to the menu. See https://docs.datasette.io/en/stable/plugin_hooks.html#table-actions-datasette-actor-database-table for a Python example. I'm on the fence about relying on JavaScript modules. I need to think about browser compatibility for them - but I'm already commited to requiring support for |
{ "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 | |
753568428 | https://github.com/simonw/datasette/issues/1160#issuecomment-753568428 | https://api.github.com/repos/simonw/datasette/issues/1160 | MDEyOklzc3VlQ29tbWVudDc1MzU2ODQyOA== | simonw 9599 | 2021-01-03T05:02:32Z | 2021-01-03T05:02:32Z | OWNER | Should this command include a I thought about doing that for But maybe I can set sensible defaults for that with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"datasette insert" command and plugin hook 775666296 | |
753568264 | https://github.com/simonw/sqlite-utils/issues/202#issuecomment-753568264 | https://api.github.com/repos/simonw/sqlite-utils/issues/202 | MDEyOklzc3VlQ29tbWVudDc1MzU2ODI2NA== | simonw 9599 | 2021-01-03T05:00:24Z | 2021-01-03T05:00:24Z | OWNER | I'm not going to implement this, because it actually needs several additional options that already exist on |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert -f colname - for configuring full-text search 738514367 | |
753567969 | https://github.com/simonw/sqlite-utils/issues/202#issuecomment-753567969 | https://api.github.com/repos/simonw/sqlite-utils/issues/202 | MDEyOklzc3VlQ29tbWVudDc1MzU2Nzk2OQ== | simonw 9599 | 2021-01-03T04:55:17Z | 2021-01-03T04:55:43Z | OWNER | The long version of this can be |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert -f colname - for configuring full-text search 738514367 | |
753567932 | https://github.com/simonw/sqlite-utils/pull/203#issuecomment-753567932 | https://api.github.com/repos/simonw/sqlite-utils/issues/203 | MDEyOklzc3VlQ29tbWVudDc1MzU2NzkzMg== | simonw 9599 | 2021-01-03T04:54:43Z | 2021-01-03T04:54:43Z | OWNER | Another option: expand the The question then is what should I'd be inclined to say they should return We can label Since this would still be a breaking change in some minor edge-cases I'm thinking maybe 4.0 needs to happen in order to land this feature. I'm not opposed to doing that, I was just hoping it might be avoidable. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
changes to allow for compound foreign keys 743384829 | |
753567744 | https://github.com/simonw/sqlite-utils/pull/203#issuecomment-753567744 | https://api.github.com/repos/simonw/sqlite-utils/issues/203 | MDEyOklzc3VlQ29tbWVudDc1MzU2Nzc0NA== | simonw 9599 | 2021-01-03T04:51:44Z | 2021-01-03T04:51:44Z | OWNER | One way that this could avoid a breaking change would be to have This is a bit of an ugly API design, and it could still break existing code that encounters a compound foreign key for the first time - but it would leave code working for the more common case of a non-compound-foreign-key. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
changes to allow for compound foreign keys 743384829 | |
753567508 | https://github.com/simonw/sqlite-utils/pull/203#issuecomment-753567508 | https://api.github.com/repos/simonw/sqlite-utils/issues/203 | MDEyOklzc3VlQ29tbWVudDc1MzU2NzUwOA== | simonw 9599 | 2021-01-03T04:48:17Z | 2021-01-03T04:48:17Z | OWNER | Sorry for taking so long to review this! This approach looks great to me - being able to optionally pass a tuple anywhere the API currently expects a column is smart, and it's consistent with how the There's just one problem I can see with this: the way it changes the This represents a breaking change to the existing API - any code that expects As such, I'd have to bump the major version of Ideally I'd like to make this change in a way that doesn't represent an API compatibility break. I need to think a bit harder about how that might be achieved. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
changes to allow for compound foreign keys 743384829 | |
753566184 | https://github.com/simonw/sqlite-utils/issues/217#issuecomment-753566184 | https://api.github.com/repos/simonw/sqlite-utils/issues/217 | MDEyOklzc3VlQ29tbWVudDc1MzU2NjE4NA== | simonw 9599 | 2021-01-03T04:27:38Z | 2021-01-03T04:27:38Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rename .escape() to .quote() 777543336 | ||
753566156 | https://github.com/simonw/sqlite-utils/issues/216#issuecomment-753566156 | https://api.github.com/repos/simonw/sqlite-utils/issues/216 | MDEyOklzc3VlQ29tbWVudDc1MzU2NjE1Ng== | simonw 9599 | 2021-01-03T04:27:14Z | 2021-01-03T04:27:14Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
database.triggers_dict introspection property 777540352 | ||
753563757 | https://github.com/simonw/sqlite-utils/issues/218#issuecomment-753563757 | https://api.github.com/repos/simonw/sqlite-utils/issues/218 | MDEyOklzc3VlQ29tbWVudDc1MzU2Mzc1Nw== | simonw 9599 | 2021-01-03T03:49:51Z | 2021-01-03T03:49:51Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"sqlite-utils triggers" command 777560474 | ||
753545757 | https://github.com/simonw/sqlite-utils/issues/215#issuecomment-753545757 | https://api.github.com/repos/simonw/sqlite-utils/issues/215 | MDEyOklzc3VlQ29tbWVudDc1MzU0NTc1Nw== | simonw 9599 | 2021-01-02T23:58:07Z | 2021-01-02T23:58:07Z | OWNER | Thought: maybe there should be a One way that could happen is if a table is dropped and recreated - the counts in the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use _counts to speed up counts 777535402 | |
753545381 | https://github.com/simonw/sqlite-utils/issues/215#issuecomment-753545381 | https://api.github.com/repos/simonw/sqlite-utils/issues/215 | MDEyOklzc3VlQ29tbWVudDc1MzU0NTM4MQ== | simonw 9599 | 2021-01-02T23:52:52Z | 2021-01-02T23:52:52Z | OWNER | Idea: a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Use _counts to speed up counts 777535402 | |
753544914 | https://github.com/simonw/sqlite-utils/issues/217#issuecomment-753544914 | https://api.github.com/repos/simonw/sqlite-utils/issues/217 | MDEyOklzc3VlQ29tbWVudDc1MzU0NDkxNA== | simonw 9599 | 2021-01-02T23:47:42Z | 2021-01-02T23:47:42Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rename .escape() to .quote() 777543336 | ||
753535488 | https://github.com/simonw/sqlite-utils/issues/213#issuecomment-753535488 | https://api.github.com/repos/simonw/sqlite-utils/issues/213 | MDEyOklzc3VlQ29tbWVudDc1MzUzNTQ4OA== | simonw 9599 | 2021-01-02T22:03:48Z | 2021-01-02T22:03:48Z | OWNER | I got this error while prototyping this:
It looks like that's because SQLite doesn't like triggers on a table that themselves then update that table - so I'm going to exclude the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
db.enable_counts() method 777529979 | |
753533775 | https://github.com/simonw/sqlite-utils/issues/213#issuecomment-753533775 | https://api.github.com/repos/simonw/sqlite-utils/issues/213 | MDEyOklzc3VlQ29tbWVudDc1MzUzMzc3NQ== | simonw 9599 | 2021-01-02T21:47:10Z | 2021-01-02T21:47:10Z | OWNER | I'm going to skip virtual tables, which I can identify using this property: https://github.com/simonw/sqlite-utils/blob/1cad7fad3e7a5b734088f5cc545b69a055e636da/sqlite_utils/db.py#L720-L726 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
db.enable_counts() method 777529979 | |
753524779 | https://github.com/simonw/datasette/issues/1168#issuecomment-753524779 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzUyNDc3OQ== | simonw 9599 | 2021-01-02T20:19:26Z | 2021-01-02T20:19:26Z | OWNER | Idea: version the metadata scheme. If the table is called |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753422324 | https://github.com/simonw/sqlite-utils/issues/212#issuecomment-753422324 | https://api.github.com/repos/simonw/sqlite-utils/issues/212 | MDEyOklzc3VlQ29tbWVudDc1MzQyMjMyNA== | simonw 9599 | 2021-01-02T03:00:34Z | 2021-01-02T03:00:34Z | OWNER | Here's a prototype:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for maintaining cache of table counts using triggers 777392020 | |
753406744 | https://github.com/simonw/sqlite-utils/issues/210#issuecomment-753406744 | https://api.github.com/repos/simonw/sqlite-utils/issues/210 | MDEyOklzc3VlQ29tbWVudDc1MzQwNjc0NA== | simonw 9599 | 2021-01-02T00:02:39Z | 2021-01-02T00:02:39Z | OWNER | It looks like https://github.com/ofajardo/pyreadr is a good library for this. I won't add this to Normally I'd write a That work is happening over here: https://github.com/simonw/datasette/issues/1160 - I'll close this issue in favour of a sometime-in-the-future |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support of RData files 767685961 | |
753405835 | https://github.com/simonw/sqlite-utils/issues/209#issuecomment-753405835 | https://api.github.com/repos/simonw/sqlite-utils/issues/209 | MDEyOklzc3VlQ29tbWVudDc1MzQwNTgzNQ== | simonw 9599 | 2021-01-01T23:52:06Z | 2021-01-01T23:52:06Z | OWNER | I just hit this one too. Such a weird bug! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Test failure with sqlite 3.34 in test_cli.py::test_optimize 766156875 | |
753402423 | https://github.com/simonw/datasette/issues/1168#issuecomment-753402423 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzQwMjQyMw== | simonw 9599 | 2021-01-01T23:16:05Z | 2021-01-01T23:16:05Z | OWNER | One catch: solving the "show me all metadata for everything in this Datasette instance" problem. Ideally there would be a SQLite table that can be queried for this. But the need to resolve the potentially complex set of precedence rules means that table would be difficult if not impossible to provide at run-time. Ideally a denormalized table would be available that featured the results of running those precedence rule calculations. But how to handle keeping this up-to-date? It would need to be recalculated any time a This is a much larger problem - but one potential fix would be to use triggers to maintain a "version number" for the Such a mechanism would have applications outside of just this |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753401001 | https://github.com/simonw/datasette/issues/1168#issuecomment-753401001 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzQwMTAwMQ== | simonw 9599 | 2021-01-01T23:01:45Z | 2021-01-01T23:01:45Z | OWNER | I need to prototype this. Could I do that as a plugin? I think so - I could try out the algorithm for loading metadata and display it on pages using some custom templates. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753400420 | https://github.com/simonw/datasette/issues/1168#issuecomment-753400420 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzQwMDQyMA== | simonw 9599 | 2021-01-01T22:53:58Z | 2021-01-01T22:53:58Z | OWNER | Precedence idea:
- First priority is non-_internal metadata from other databases - if those conflict then pick then the alphabetically-ordered-first database name wins
- Next priority: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753400306 | https://github.com/simonw/datasette/issues/1168#issuecomment-753400306 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzQwMDMwNg== | simonw 9599 | 2021-01-01T22:52:44Z | 2021-01-01T22:52:44Z | OWNER | Also: probably load column metadata as part of the table metadata rather than loading column metadata individually, since it's going to be rare to want the metadata for a single column rather than for an entire table full of columns. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753400265 | https://github.com/simonw/datasette/issues/1168#issuecomment-753400265 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzQwMDI2NQ== | simonw 9599 | 2021-01-01T22:52:09Z | 2021-01-01T22:52:09Z | OWNER | From an implementation perspective, I think the way this works is SQL queries read the relevant metadata from ALL available metadata tables, then Python code solves the precedence rules to produce the final, combined metadata for a database/table/column. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753399635 | https://github.com/simonw/datasette/issues/1168#issuecomment-753399635 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5OTYzNQ== | simonw 9599 | 2021-01-01T22:45:21Z | 2021-01-01T22:50:21Z | OWNER | Would also need to figure out the precedence rules:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753399428 | https://github.com/simonw/datasette/issues/1168#issuecomment-753399428 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5OTQyOA== | simonw 9599 | 2021-01-01T22:43:14Z | 2021-01-01T22:43:22Z | OWNER | Could this use a compound primary key on |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753399366 | https://github.com/simonw/datasette/issues/1168#issuecomment-753399366 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5OTM2Ng== | simonw 9599 | 2021-01-01T22:42:37Z | 2021-01-01T22:42:37Z | OWNER | So what would the database schema for this look like? I'm leaning towards a single table called If it's just a single | database | table | column | metadata | | --- | --- | --- | --- | | | mytable | | {"title": "My Table" } | | | mytable | mycolumn | {"description": "Column description" } | | otherdb | othertable | | {"description": "Table in another DB" } | If the The alternative to the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753398542 | https://github.com/simonw/datasette/issues/1168#issuecomment-753398542 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5ODU0Mg== | simonw 9599 | 2021-01-01T22:37:24Z | 2021-01-01T22:37:24Z | OWNER | The direction I'm leaning in now is the following:
Plugins that want to provide metadata can do so by populating a table. They could even maintain their own in-memory database for this, or they could write to the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753392102 | https://github.com/simonw/datasette/issues/1168#issuecomment-753392102 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5MjEwMg== | simonw 9599 | 2021-01-01T22:06:33Z | 2021-01-01T22:06:33Z | OWNER | Some SQLite databases include SQL comments in the schema definition which tell you what each column means:
I had an idea to build a plugin that could return these. That would be easy with a "get metadata for this column" plugin hook - in the absence of one a plugin could still run that reads the schemas on startup and uses them to populate a metadata database table somewhere. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753391869 | https://github.com/simonw/datasette/issues/1168#issuecomment-753391869 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5MTg2OQ== | simonw 9599 | 2021-01-01T22:04:30Z | 2021-01-01T22:04:30Z | OWNER | The sticking point here seems to be the plugin hook. Allowing plugins to over-ride the way the question "give me the metadata for this database/table/column" is answered makes the database-backed metadata mechanisms much more complicated to think about. What if plugins didn't get to over-ride metadata in this way, but could instead update the metadata in a persistent Datasette-managed storage mechanism? Then maybe Datasette could do the following:
If database files were optionally allowed to store metadata about tables that live in another database file this could perhaps solve the plugin needs - since an "edit metadata" plugin would be able to edit records in a separate, dedicated |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753390791 | https://github.com/simonw/datasette/issues/1168#issuecomment-753390791 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5MDc5MQ== | simonw 9599 | 2021-01-01T22:00:42Z | 2021-01-01T22:00:42Z | OWNER | Here are the requirements I'm currently trying to satisfy:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753390262 | https://github.com/simonw/datasette/issues/1168#issuecomment-753390262 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM5MDI2Mg== | simonw 9599 | 2021-01-01T21:58:11Z | 2021-01-01T21:58:11Z | OWNER | One possibility: plugins could write directly to that in-memory database table. But how would they know to write again should the server restart? Maybe they would write to it once when called by the Also: if I want to support metadata optionally living in a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753389938 | https://github.com/simonw/datasette/issues/1168#issuecomment-753389938 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM4OTkzOA== | simonw 9599 | 2021-01-01T21:54:15Z | 2021-01-01T21:54:15Z | OWNER | So what if the These columns could be populated by Datasette on startup through reading the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753389477 | https://github.com/simonw/datasette/issues/1168#issuecomment-753389477 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM4OTQ3Nw== | simonw 9599 | 2021-01-01T21:49:57Z | 2021-01-01T21:49:57Z | OWNER | What if metadata was stored in a JSON text column in the existing The downside of JSON columns generally is that they're harder to run indexed queries against. For metadata I don't think that matters - even with 10,000 tables each with their own metadata a SQL query asking for e.g. "everything that has Apache 2 as the license" would return in just a few ms. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753388809 | https://github.com/simonw/datasette/issues/1168#issuecomment-753388809 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM4ODgwOQ== | simonw 9599 | 2021-01-01T21:47:51Z | 2021-01-01T21:47:51Z | OWNER | A database that exposes metadata will have the same restriction as the new As such, I'd rather bundle any metadata tables into the existing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753366024 | https://github.com/simonw/datasette/issues/1168#issuecomment-753366024 | https://api.github.com/repos/simonw/datasette/issues/1168 | MDEyOklzc3VlQ29tbWVudDc1MzM2NjAyNA== | simonw 9599 | 2021-01-01T18:48:34Z | 2021-01-01T18:48:34Z | OWNER | Also: in #188 I proposed bundling metadata in the SQLite database itself alongside the data. This is a great way of ensuring metadata travels with the data when it is downloaded as a SQLite |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for storing metadata in _metadata tables 777333388 | |
753224351 | https://github.com/simonw/datasette/issues/1166#issuecomment-753224351 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIyNDM1MQ== | simonw 9599 | 2020-12-31T23:23:29Z | 2020-12-31T23:23:29Z | OWNER | I should configure the action to only run if changes have been made within the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753221646 | https://github.com/simonw/datasette/issues/983#issuecomment-753221646 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIyMTY0Ng== | simonw 9599 | 2020-12-31T22:58:47Z | 2020-12-31T22:58:47Z | OWNER | https://github.com/mishoo/UglifyJS/issues/1905#issuecomment-300485490 says:
|
{ "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 | |
753221362 | https://github.com/simonw/datasette/issues/1164#issuecomment-753221362 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1MzIyMTM2Mg== | simonw 9599 | 2020-12-31T22:55:57Z | 2020-12-31T22:55:57Z | OWNER | I had to add this as the first line in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
753220665 | https://github.com/simonw/datasette/issues/1164#issuecomment-753220665 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1MzIyMDY2NQ== | simonw 9599 | 2020-12-31T22:49:36Z | 2020-12-31T22:49:36Z | OWNER | I started with a 7K
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
753220412 | https://github.com/simonw/datasette/issues/1164#issuecomment-753220412 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1MzIyMDQxMg== | simonw 9599 | 2020-12-31T22:47:36Z | 2020-12-31T22:47:36Z | OWNER | I'm trying to minify
It turns out But
Annoyingly it looks like
I really don't like how |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
753219521 | https://github.com/simonw/datasette/issues/983#issuecomment-753219521 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxOTUyMQ== | simonw 9599 | 2020-12-31T22:39:52Z | 2020-12-31T22:39:52Z | OWNER | For inlining the |
{ "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 | |
753219407 | https://github.com/simonw/datasette/issues/983#issuecomment-753219407 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxOTQwNw== | simonw 9599 | 2020-12-31T22:38:45Z | 2020-12-31T22:39:10Z | OWNER | You'll be able to add JavaScript plugins using a bunch of different mechanisms:
|
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
JavaScript plugin hooks mechanism similar to pluggy 712260429 | |
753217917 | https://github.com/simonw/datasette/issues/983#issuecomment-753217917 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxNzkxNw== | simonw 9599 | 2020-12-31T22:23:29Z | 2020-12-31T22:23:36Z | OWNER | If I'm going to do that, it would be good if subsequent plugins that register against the Maybe the tiny bootstrap code could define a |
{ "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 | |
753217714 | https://github.com/simonw/datasette/issues/983#issuecomment-753217714 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxNzcxNA== | simonw 9599 | 2020-12-31T22:21:33Z | 2020-12-31T22:21:33Z | OWNER | Eventually I'd like to provide a whole bunch of other But I don't want to inline those into the page. So... I think the basic plugin system remains inline - maybe from an inlined file called If a plugin wants to take advantage of those APIs, maybe it registers itself using |
{ "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 | |
753217127 | https://github.com/simonw/datasette/issues/987#issuecomment-753217127 | https://api.github.com/repos/simonw/datasette/issues/987 | MDEyOklzc3VlQ29tbWVudDc1MzIxNzEyNw== | simonw 9599 | 2020-12-31T22:16:46Z | 2020-12-31T22:16:46Z | OWNER | I'm going to use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented HTML hooks for JavaScript plugin authors 712984738 | |
753215761 | https://github.com/simonw/datasette/issues/983#issuecomment-753215761 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxNTc2MQ== | simonw 9599 | 2020-12-31T22:07:31Z | 2020-12-31T22:07:31Z | OWNER | I think I need to keep the mechanism whereby a plugin can return I'll write some example plugins to help me decide if the filtering-out-of-undefined mechanism is needed or not. |
{ "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 | |
753215545 | https://github.com/simonw/datasette/issues/983#issuecomment-753215545 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MzIxNTU0NQ== | simonw 9599 | 2020-12-31T22:05:41Z | 2020-12-31T22:05:41Z | OWNER | Using object destructuring like that is a great idea. I'm going to play with your version - it's delightfully succinct. |
{ "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 | |
753214664 | https://github.com/simonw/datasette/issues/1166#issuecomment-753214664 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIxNDY2NA== | simonw 9599 | 2020-12-31T21:58:04Z | 2020-12-31T21:58:04Z | OWNER | Wrote a TIL about this: https://til.simonwillison.net/github-actions/prettier-github-actions |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753211535 | https://github.com/simonw/datasette/issues/1166#issuecomment-753211535 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIxMTUzNQ== | simonw 9599 | 2020-12-31T21:46:04Z | 2020-12-31T21:46:04Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | ||
753210536 | https://github.com/simonw/datasette/issues/1166#issuecomment-753210536 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIxMDUzNg== | simonw 9599 | 2020-12-31T21:45:19Z | 2020-12-31T21:45:19Z | OWNER | Oops, committed that bad formatting test to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753209192 | https://github.com/simonw/datasette/issues/1166#issuecomment-753209192 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIwOTE5Mg== | simonw 9599 | 2020-12-31T21:44:22Z | 2020-12-31T21:44:22Z | OWNER | Tests passed in https://github.com/simonw/datasette/runs/1631677726?check_suite_focus=true I'm going to try submitting a pull request with badly formatted JavaScript to see if it gets caught. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753200580 | https://github.com/simonw/datasette/issues/1166#issuecomment-753200580 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzIwMDU4MA== | simonw 9599 | 2020-12-31T21:38:06Z | 2020-12-31T21:38:06Z | OWNER | I think this should work:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753197957 | https://github.com/simonw/datasette/issues/1166#issuecomment-753197957 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzE5Nzk1Nw== | simonw 9599 | 2020-12-31T21:36:14Z | 2020-12-31T21:36:14Z | OWNER | Maybe not that action actually - I wanted to use a pre-built action to avoid installing Prettier every time, but that's what it seems to do: https://github.com/creyD/prettier_action/blob/bb361e2979cff283ca7684908deac8f95400e779/entrypoint.sh#L28-L37 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753195905 | https://github.com/simonw/datasette/issues/1166#issuecomment-753195905 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzE5NTkwNQ== | simonw 9599 | 2020-12-31T21:34:46Z | 2020-12-31T21:34:46Z | OWNER | This action looks good - tag 3.2 is equivalent to this commit hash: https://github.com/creyD/prettier_action/tree/bb361e2979cff283ca7684908deac8f95400e779 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
753193475 | https://github.com/simonw/datasette/issues/1166#issuecomment-753193475 | https://api.github.com/repos/simonw/datasette/issues/1166 | MDEyOklzc3VlQ29tbWVudDc1MzE5MzQ3NQ== | simonw 9599 | 2020-12-31T21:33:00Z | 2020-12-31T21:33:00Z | OWNER | I want a CI check that confirms that files conform to prettier - but only This seems to do the job:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Adopt Prettier for JavaScript code formatting 777140799 | |
752846267 | https://github.com/simonw/datasette/issues/1165#issuecomment-752846267 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjg0NjI2Nw== | simonw 9599 | 2020-12-31T05:10:41Z | 2020-12-31T05:13:14Z | OWNER | https://github.com/PostHog/posthog/tree/master/cypress/integration has some useful examples, linked from this article: https://posthog.com/blog/cypress-end-to-end-tests Also useful: their workflow https://github.com/PostHog/posthog/blob/master/.github/workflows/e2e.yml |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752839433 | https://github.com/simonw/datasette/issues/1165#issuecomment-752839433 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1MjgzOTQzMw== | simonw 9599 | 2020-12-31T04:29:40Z | 2020-12-31T04:29:40Z | OWNER | Important to absorb the slightly bizarre assertion syntax from Chai - docs here https://www.chaijs.com/api/bdd/ |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752828851 | https://github.com/simonw/datasette/issues/1165#issuecomment-752828851 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1MjgyODg1MQ== | simonw 9599 | 2020-12-31T03:19:38Z | 2020-12-31T03:19:38Z | OWNER | I got Cypress working! I added the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752780000 | https://github.com/simonw/datasette/issues/1165#issuecomment-752780000 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjc4MDAwMA== | simonw 9599 | 2020-12-30T22:41:25Z | 2020-12-30T22:41:25Z | OWNER | Jest works with Puppeteer: https://jestjs.io/docs/en/puppeteer |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752779820 | https://github.com/simonw/datasette/issues/1165#issuecomment-752779820 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjc3OTgyMA== | simonw 9599 | 2020-12-30T22:40:28Z | 2020-12-30T22:40:28Z | OWNER | I don't know if Jest on the command-line is the right tool for this. It works for the So maybe I should just find a browser testing solution and figure out how to run that under CI in GitHub Actions. Maybe https://www.cypress.io/ ? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752779490 | https://github.com/simonw/datasette/issues/1165#issuecomment-752779490 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjc3OTQ5MA== | simonw 9599 | 2020-12-30T22:38:43Z | 2020-12-30T22:38:43Z | OWNER | Turned that into a TIL: https://til.simonwillison.net/javascript/jest-without-package-json |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752777744 | https://github.com/simonw/datasette/issues/1165#issuecomment-752777744 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjc3Nzc0NA== | simonw 9599 | 2020-12-30T22:30:24Z | 2020-12-30T22:30:24Z | OWNER | https://www.valentinog.com/blog/jest/ was useful. I created a ```javascript const datasette = require("../plugins.js"); describe("Datasette Plugins", () => { test("it should have datasette.plugins", () => { expect(!!datasette.plugins).toEqual(true); }); test("registering a plugin should work", () => { datasette.plugins.register("numbers", (a, b) => a + b, ["a", "b"]); var result = datasette.plugins.call("numbers", { a: 1, b: 2 }); expect(result).toEqual([3]); datasette.plugins.register("numbers", (a, b) => a * b, ["a", "b"]); var result2 = datasette.plugins.call("numbers", { a: 1, b: 2 }); expect(result2).toEqual([3, 2]); }); }); ``` In module.exports = datasette;
Then inside ``` % npx jest -c '{}' PASS tests/plugins.spec.js Datasette Plugins ✓ it should have datasette.plugins (3 ms) ✓ registering a plugin should work (1 ms) Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.163 s
Ran all test suites.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752773508 | https://github.com/simonw/datasette/issues/983#issuecomment-752773508 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc3MzUwOA== | simonw 9599 | 2020-12-30T22:10:08Z | 2020-12-30T22:11:34Z | OWNER | https://twitter.com/dracos/status/1344402639476424706 points out that plugins returning 0 will be ignored. This should probably check for |
{ "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 | |
752770488 | https://github.com/simonw/datasette/issues/983#issuecomment-752770488 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc3MDQ4OA== | simonw 9599 | 2020-12-30T21:55:35Z | 2020-12-30T21:58:26Z | OWNER | This one minifies to 241:
|
{ "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 | |
752770133 | https://github.com/simonw/datasette/issues/983#issuecomment-752770133 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc3MDEzMw== | simonw 9599 | 2020-12-30T21:53:45Z | 2020-12-30T21:54:22Z | OWNER | FixMyStreet inlines some JavaScript, and it's always a good idea to copy what they're doing when it comes to web performance: https://github.com/mysociety/fixmystreet/blob/23e9564b58a86b783ce47f3c0bf837cbd4fe7282/templates/web/base/common_header_tags.html#L19-L25 Note |
{ "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 | |
752769452 | https://github.com/simonw/datasette/issues/1164#issuecomment-752769452 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1Mjc2OTQ1Mg== | simonw 9599 | 2020-12-30T21:50:16Z | 2020-12-30T21:50:16Z | OWNER | If I implement this I can automate the CodeMirror minification and remove the bit about running |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
752768785 | https://github.com/simonw/datasette/issues/1164#issuecomment-752768785 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1Mjc2ODc4NQ== | simonw 9599 | 2020-12-30T21:47:06Z | 2020-12-30T21:47:06Z | OWNER | If I'm going to minify |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
752768652 | https://github.com/simonw/datasette/issues/1164#issuecomment-752768652 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1Mjc2ODY1Mg== | simonw 9599 | 2020-12-30T21:46:29Z | 2020-12-30T21:46:29Z | OWNER | Running https://skalman.github.io/UglifyJS-online/ against https://github.com/simonw/datasette/blob/0.53/datasette/static/table.js knocks it down from 7810 characters to 4643. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
752767500 | https://github.com/simonw/datasette/issues/983#issuecomment-752767500 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc2NzUwMA== | simonw 9599 | 2020-12-30T21:42:07Z | 2020-12-30T21:42:07Z | OWNER | Another option: have both "dev" and "production" versions of the plugin mechanism script. Make it easy to switch between the two. Build JavaScript unit tests that exercise the "production" APIs against the development version, and have extra tests that just work against the features in the development version. |
{ "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 | |
752767174 | https://github.com/simonw/datasette/issues/983#issuecomment-752767174 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc2NzE3NA== | simonw 9599 | 2020-12-30T21:40:44Z | 2020-12-30T21:40:44Z | OWNER | Started a Twitter thread about this here: https://twitter.com/simonw/status/1344392603794477056 |
{ "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 | |
752751490 | https://github.com/simonw/datasette/issues/983#issuecomment-752751490 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc1MTQ5MA== | simonw 9599 | 2020-12-30T20:40:04Z | 2020-12-30T21:34:22Z | OWNER | This one is 683 bytes with Uglify - I like how https://skalman.github.io/UglifyJS-online/ shows you the minified character count as you edit the script: ```javascript window.datasette = window.datasette || {}; window.datasette.plugins = (() => { var registry = {}; var definitions = {}; var stringify = JSON.stringify;
})();
|
{ "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 | |
752760815 | https://github.com/simonw/datasette/issues/983#issuecomment-752760815 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc2MDgxNQ== | simonw 9599 | 2020-12-30T21:15:41Z | 2020-12-30T21:15:41Z | OWNER | I'm going to write a few example plugins and try them out against the longer and shorter versions of the script, to get a better feel for how useful the longer versions with the error handling and explicit definition actually are. |
{ "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 | |
752760054 | https://github.com/simonw/datasette/issues/983#issuecomment-752760054 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc2MDA1NA== | simonw 9599 | 2020-12-30T21:12:36Z | 2020-12-30T21:14:05Z | OWNER | I gotta admit that 262 byte version is pretty tempting, if it's going to end up in the |
{ "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 | |
752759885 | https://github.com/simonw/datasette/issues/983#issuecomment-752759885 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc1OTg4NQ== | simonw 9599 | 2020-12-30T21:11:52Z | 2020-12-30T21:14:00Z | OWNER | 262 bytes if I remove the parameter introspection code, instead requiring plugin authors to specify the arguments they take:
|
{ "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 | |
752758802 | https://github.com/simonw/datasette/issues/983#issuecomment-752758802 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc1ODgwMg== | simonw 9599 | 2020-12-30T21:07:33Z | 2020-12-30T21:10:10Z | OWNER | Removing the
})();
|
{ "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 | |
752757910 | https://github.com/simonw/datasette/issues/1165#issuecomment-752757910 | https://api.github.com/repos/simonw/datasette/issues/1165 | MDEyOklzc3VlQ29tbWVudDc1Mjc1NzkxMA== | simonw 9599 | 2020-12-30T21:04:18Z | 2020-12-30T21:04:18Z | OWNER | https://jestjs.io/ looks worth trying here. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for executing JavaScript unit tests 776635426 | |
752757289 | https://github.com/simonw/datasette/issues/983#issuecomment-752757289 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc1NzI4OQ== | simonw 9599 | 2020-12-30T21:02:20Z | 2020-12-30T21:02:20Z | OWNER | I'm going to need to add JavaScript unit tests for this new plugin system. |
{ "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 | |
752757075 | https://github.com/simonw/datasette/issues/1164#issuecomment-752757075 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1Mjc1NzA3NQ== | simonw 9599 | 2020-12-30T21:01:27Z | 2020-12-30T21:01:27Z | OWNER | I don't want Datasette contributors to need a working Node.js install to run the tests or work on Datasette unless they are explicitly working on the JavaScript. I think I'm going to do this with a unit test that runs only if That way if anyone checks in a change to JavaScript but forgets to run the minifier the tests will fail in CI. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
752756612 | https://github.com/simonw/datasette/issues/1164#issuecomment-752756612 | https://api.github.com/repos/simonw/datasette/issues/1164 | MDEyOklzc3VlQ29tbWVudDc1Mjc1NjYxMg== | simonw 9599 | 2020-12-30T20:59:54Z | 2020-12-30T20:59:54Z | OWNER | I tried a few different pure-Python JavaScript minifying libraries and none of them produced results as good as https://www.npmjs.com/package/uglify-js for the plugin code I'm considering in #983. So I think I'll need to rely on a Node.js tool for this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism for minifying JavaScript that ships with Datasette 776634318 | |
752750551 | https://github.com/simonw/datasette/issues/983#issuecomment-752750551 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc1MDU1MQ== | simonw 9599 | 2020-12-30T20:36:38Z | 2020-12-30T20:37:48Z | OWNER | This version minifies to 702 characters: ```javascript window.datasette = window.datasette || {}; window.datasette.plugins = (() => { var registry = {}; var definitions = {}; var stringify = JSON.stringify;
})(); ``` Or 701 characters using https://skalman.github.io/UglifyJS-online/ |
{ "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 | |
752749189 | https://github.com/simonw/datasette/issues/983#issuecomment-752749189 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0OTE4OQ== | simonw 9599 | 2020-12-30T20:31:28Z | 2020-12-30T20:31:28Z | OWNER | Using raw string exceptions, |
{ "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 | |
752748496 | https://github.com/simonw/datasette/issues/983#issuecomment-752748496 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0ODQ5Ng== | simonw 9599 | 2020-12-30T20:28:48Z | 2020-12-30T20:28:48Z | OWNER | If I'm going to minify it I'll need to figure out a build step in Datasette itself so that I can easily work on that minified version. |
{ "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 | |
752747999 | https://github.com/simonw/datasette/issues/983#issuecomment-752747999 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0Nzk5OQ== | simonw 9599 | 2020-12-30T20:27:00Z | 2020-12-30T20:27:00Z | OWNER | I need to decide how this code is going to be loaded. Putting it in a blocking Running it through https://javascript-minifier.com/ produces this, which is 855 characters - so maybe I could inline that into the header of the page?
|
{ "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 | |
752747169 | https://github.com/simonw/datasette/issues/983#issuecomment-752747169 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0NzE2OQ== | simonw 9599 | 2020-12-30T20:24:07Z | 2020-12-30T20:24:07Z | OWNER | This version adds
})();
|
{ "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 | |
752744311 | https://github.com/simonw/datasette/issues/983#issuecomment-752744311 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0NDMxMQ== | simonw 9599 | 2020-12-30T20:12:50Z | 2020-12-30T20:13:02Z | OWNER | This could work to define a plugin hook:
|
{ "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 | |
752744195 | https://github.com/simonw/datasette/issues/983#issuecomment-752744195 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0NDE5NQ== | simonw 9599 | 2020-12-30T20:12:26Z | 2020-12-30T20:12:26Z | OWNER | This implementation doesn't have an equivalent of "hookspecs" which can identify if a registered plugin implementation matches a known signature. I should add that, it will provide a better developer experience if someone has a typo. |
{ "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 | |
752742669 | https://github.com/simonw/datasette/issues/983#issuecomment-752742669 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1Mjc0MjY2OQ== | simonw 9599 | 2020-12-30T20:07:05Z | 2020-12-30T20:07:18Z | OWNER | Initial prototype: ```javascript window.datasette = {}; window.datasette.plugins = (function() { var registry = {};
})();
|
{ "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 | |
752729035 | https://github.com/simonw/datasette/issues/983#issuecomment-752729035 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcyOTAzNQ== | simonw 9599 | 2020-12-30T19:15:56Z | 2020-12-30T19:16:44Z | OWNER | The
|
{ "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 | |
752722863 | https://github.com/simonw/datasette/issues/983#issuecomment-752722863 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcyMjg2Mw== | simonw 9599 | 2020-12-30T18:52:39Z | 2020-12-30T18:52:39Z | OWNER | Then to call the plugins:
|
{ "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 | |
752721840 | https://github.com/simonw/datasette/issues/983#issuecomment-752721840 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcyMTg0MA== | simonw 9599 | 2020-12-30T18:48:53Z | 2020-12-30T18:51:51Z | OWNER | Potential design:
|
{ "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 | |
752721069 | https://github.com/simonw/datasette/issues/983#issuecomment-752721069 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcyMTA2OQ== | simonw 9599 | 2020-12-30T18:46:10Z | 2020-12-30T18:46:10Z | OWNER | Pluggy does dependency injection by introspecting the named arguments to the Python function, which I really like. That's tricker in JavaScript. It looks like the only way to introspect a function is to look at the Even more challenging: JavaScript developers love minifying their code, and minification can shorten the function parameter names. From https://code-maven.com/dependency-injection-in-angularjs it looks like Angular.js does dependency injection and solves this by letting you optionally provide a separate list of the arguments your function uses:
I can copy that approach: I'll introspect by default, but provide a documented mechanism for explicitly listing your parameter names so that if you know your plugin code will be minified you can use that instead. |
{ "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 | |
752715412 | https://github.com/simonw/datasette/issues/983#issuecomment-752715412 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcxNTQxMg== | simonw 9599 | 2020-12-30T18:25:31Z | 2020-12-30T18:25:31Z | OWNER | I'm going to introduce a global |
{ "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 | |
752715236 | https://github.com/simonw/datasette/issues/983#issuecomment-752715236 | https://api.github.com/repos/simonw/datasette/issues/983 | MDEyOklzc3VlQ29tbWVudDc1MjcxNTIzNg== | simonw 9599 | 2020-12-30T18:24:54Z | 2020-12-30T18:24:54Z | OWNER | I think I'm going to try building a very lightweight clone of the core API design of Pluggy - not the advanced features, just the idea that plugins can register and a call to |
{ "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 | |
752714747 | https://github.com/simonw/datasette/issues/987#issuecomment-752714747 | https://api.github.com/repos/simonw/datasette/issues/987 | MDEyOklzc3VlQ29tbWVudDc1MjcxNDc0Nw== | simonw 9599 | 2020-12-30T18:23:08Z | 2020-12-30T18:23:20Z | OWNER | In terms of "places to put your plugin content", the simplest solution I can think of is something like this: ```html ``` Alternative designs:
I think the original option - an empty |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented HTML hooks for JavaScript plugin authors 712984738 | |
752697279 | https://github.com/simonw/datasette/issues/987#issuecomment-752697279 | https://api.github.com/repos/simonw/datasette/issues/987 | MDEyOklzc3VlQ29tbWVudDc1MjY5NzI3OQ== | simonw 9599 | 2020-12-30T17:23:27Z | 2020-12-30T17:23:32Z | OWNER | Related problem: right now if you're writing custom template it's not at all obvious how to write them such that visualization plugins like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented HTML hooks for JavaScript plugin authors 712984738 | |
752696499 | https://github.com/simonw/datasette/issues/987#issuecomment-752696499 | https://api.github.com/repos/simonw/datasette/issues/987 | MDEyOklzc3VlQ29tbWVudDc1MjY5NjQ5OQ== | simonw 9599 | 2020-12-30T17:21:08Z | 2020-12-30T17:21:08Z | OWNER | More generally, I need to document certain areas of the page that JavaScript plugins are invited to append their content to - such that plugin authors can use them and feel confident that future changes to the Datasette templates won't break their plugins. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented HTML hooks for JavaScript plugin authors 712984738 | |
752275611 | https://github.com/simonw/datasette/issues/1160#issuecomment-752275611 | https://api.github.com/repos/simonw/datasette/issues/1160 | MDEyOklzc3VlQ29tbWVudDc1MjI3NTYxMQ== | simonw 9599 | 2020-12-29T23:32:04Z | 2020-12-29T23:32:04Z | OWNER | If I can get this working for CSV, TSV, JSON and JSON-NL that should be enough to exercise the API design pretty well across both streaming and non-streaming formats. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"datasette insert" command and plugin hook 775666296 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
issue >30