issue_comments
24 rows where author_association = "CONTRIBUTOR" and user = 95570 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: issue_url, reactions, created_at (date), updated_at (date)
user 1
- bgrins · 24 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1319533445 | https://github.com/simonw/datasette/issues/1897#issuecomment-1319533445 | https://api.github.com/repos/simonw/datasette/issues/1897 | IC_kwDOBm6k_c5OpnuF | bgrins 95570 | 2022-11-18T04:38:03Z | 2022-11-18T04:38:03Z | CONTRIBUTOR | Are you tracking the change to send the JSON over to the frontend separately or was that part of this? Something like this is probably pretty close https://github.com/bgrins/datasette/commit/8431c98850c7a552dbcde2a4dd0c3dc942a97d25#diff-0c93232bfd5477eeac96382e52769108b41433d960d5277ffcccf2f464e60abdR9 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Serve schema JSON to the SQL editor to enable autocomplete 1452457263 | |
1318897922 | https://github.com/simonw/datasette/issues/1899#issuecomment-1318897922 | https://api.github.com/repos/simonw/datasette/issues/1899 | IC_kwDOBm6k_c5OnMkC | bgrins 95570 | 2022-11-17T16:32:42Z | 2022-11-17T16:32:42Z | CONTRIBUTOR | Another idea would be to just not set a min-height and allow the 1 line input to be 1 line heigh |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Clicking within the CodeMirror area below the SQL (i.e. when there's only a single line) doesn't cause the editor to get focused 1452495049 | |
1317873458 | https://github.com/simonw/datasette/issues/1899#issuecomment-1317873458 | https://api.github.com/repos/simonw/datasette/issues/1899 | IC_kwDOBm6k_c5OjScy | bgrins 95570 | 2022-11-17T00:31:07Z | 2022-11-17T00:31:07Z | CONTRIBUTOR | This is one way to fix it
I don't love it but it seems to work for the default case. You can still retrigger the bug by resizing the editor to be > 70px high. The other approach would be to listen for a click on that empty region and move focus to the editor, or something |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Clicking within the CodeMirror area below the SQL (i.e. when there's only a single line) doesn't cause the editor to get focused 1452495049 | |
1317834838 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317834838 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjJBW | bgrins 95570 | 2022-11-16T23:50:58Z | 2022-11-16T23:50:58Z | CONTRIBUTOR | Should we empty out the fixture schema to avoid fixture autocomplete showing up on live databases in the interim, or are you planning to tackle #1897 shortly? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317805482 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317805482 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjB2q | bgrins 95570 | 2022-11-16T23:18:17Z | 2022-11-16T23:18:17Z | CONTRIBUTOR | Alright with https://github.com/simonw/datasette/pull/1893/commits/f254be4b38936e95e7a7f25866e7c6b0520db96f we should be getting autocomplete on fixture data. Give that a test and see what you think |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317789308 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317789308 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oi958 | bgrins 95570 | 2022-11-16T22:59:57Z | 2022-11-16T22:59:57Z | CONTRIBUTOR | I can push up a commit that uses the static fixtures schema for testing, but given that the query used to generate it is authed we would still need some work to make that work on live data, right? Ideally it could come down to db and query views directly to avoid waiting on an extra xhr and managing that state change.On Nov 16, 2022, at 2:16 PM, Simon Willison @.***> wrote: Honestly I'm not too bothered if table names with weird characters don't work correctly here - I care about those in the Datasette fixtures.db database because Datasette aims to support ANY valid SQLite database, so I need stuff in the test suite that includes weird edge cases like this. But I would hope very few people actually create tables with spaces in their names, so it's not a huge concern to me if autocompletion doesn't work properly for those. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***> |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317715580 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317715580 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oir58 | bgrins 95570 | 2022-11-16T21:49:51Z | 2022-11-16T21:49:51Z | CONTRIBUTOR | I think the table completion still has some quirks to work out. Something like
Seems to work alright, although it will append it after any other numbers you've started typing - so you end up with You can do
Which is pretty neat and will show the non-escaped string but complete to the escaped one. You can't easily do that with the table names themselves (you can pass a It's buggy enough (bad output for these unusual table names) that I'd suggest that work gets moved into a follow up to the upgrade to 6. That would give space to sort out how to deliver that to the view directly, figure out where name escaping should happen, and have overall testing to uncover bugs and fix papercuts before enabling it. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317681193 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317681193 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oijgp | bgrins 95570 | 2022-11-16T21:19:13Z | 2022-11-16T21:19:13Z | CONTRIBUTOR | Alright, added Cmd+Enter to submit (Ctrl+Enter on Windows as well bc of using Meta-Enter on codemirror). We can make that MacOS only by changing the combo to Cmd+Enter specifically but I think it's probably fine to have both. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317522323 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317522323 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oh8uT | bgrins 95570 | 2022-11-16T18:59:49Z | 2022-11-16T18:59:49Z | CONTRIBUTOR | Or I guess you could return only the escaped table name and then we could derive the unescaped from the client side (removing the outer |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317520304 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317520304 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oh8Ow | bgrins 95570 | 2022-11-16T18:58:43Z | 2022-11-16T18:58:43Z | CONTRIBUTOR | Nice. And is it possible to include another field which is an escaped table name (only when necessary) - i.e. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317329157 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317329157 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhNkF | bgrins 95570 | 2022-11-16T16:46:52Z | 2022-11-16T16:46:52Z | CONTRIBUTOR |
I checked and if I empty out app.css the bug goes away, so there's some kind of inheritance issue there. It's hard to debug bc the autocomplete popup goes away on blur (i.e. when trying to inspect it in devtools), but at least it's narrowed down a bit. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317326406 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317326406 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhM5G | bgrins 95570 | 2022-11-16T16:45:09Z | 2022-11-16T16:45:09Z | CONTRIBUTOR | For escaped table names it looks like we could pass a Completion object (https://codemirror.net/docs/ref/#autocomplete) instead of a string which would allow the non escaped name to be a label and then the escaped name to actually complete in the editor, which might help with some of the funkiness I was seeing w/ completion |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317314064 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317314064 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhJ4Q | bgrins 95570 | 2022-11-16T16:36:46Z | 2022-11-16T16:36:46Z | CONTRIBUTOR | With
we get table autocompletion and column completion if you name the table in the query (see screencast). I do see bugs with escaped table names like https://user-images.githubusercontent.com/95570/202238521-e613b4e2-ba92-4418-9068-fc022edaee93.mp4 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317281292 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317281292 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhB4M | bgrins 95570 | 2022-11-16T16:19:16Z | 2022-11-16T16:19:16Z | CONTRIBUTOR | Ha, nice idea! Updating the dialect with that list. I'm thinking of also adding |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316387382 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316387382 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Odno2 | bgrins 95570 | 2022-11-16T05:33:55Z | 2022-11-16T05:33:55Z | CONTRIBUTOR | I added a commit to make our own dialect at https://github.com/simonw/datasette/pull/1893/commits/e273fc8ed5341bdf0b622e722d761bd2acc30a90. Pulled in the full list of keywords from https://www.sqlite.org/lang_keywords.html but haven't gone through and pruned it to only include common select keywords. @simonw you'll have better knowledge than me on that - do you want to take a first shot at narrowing that down to the set that people will be using in the editor? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316339035 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316339035 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Odb1b | bgrins 95570 | 2022-11-16T04:47:11Z | 2022-11-16T04:47:11Z | CONTRIBUTOR |
I was thinking of the BigQuery console, like But they must be doing something pretty custom & appears to be using Monaco anyway. I suspect some kind of lower level autocomplete integration could make this work, but if the table completion is a good-enough starting point I think it's not too hard. The main issue is that we don't pass the relevant table data down to QueryView. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316320521 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316320521 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdXUJ | bgrins 95570 | 2022-11-16T04:29:23Z | 2022-11-16T04:29:23Z | CONTRIBUTOR | UI issue I see on the autocomplete popup with overlapping icon & text. Screenshot's from Firefox, it seems even a little more pronounced on Safari |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316318961 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316318961 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdW7x | bgrins 95570 | 2022-11-16T04:27:51Z | 2022-11-16T04:27:51Z | CONTRIBUTOR |
The default focus styles appear to be
Which I also see on desktop. Would be nice to changed to whatever the default UA textarea styles are to blend in better but I wouldn't recommend removing it entirely - just to keep the visual indication that the element is focused. Maybe followup material to have a theming pass |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316256386 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316256386 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdHqC | bgrins 95570 | 2022-11-16T03:18:06Z | 2022-11-16T03:18:06Z | CONTRIBUTOR |
This version "sort of" works when on the main database page where the template passes the relevant data https://github.com/bgrins/datasette/commit/8431c98850c7a552dbcde2a4dd0c3dc942a97d25 by doing this and passing that into the ```
let TABLES_DATA = [];
{% if tables is defined %} // Turn into an object, shaped like https://github.com/codemirror/lang-sql/blob/ebf115fffdbe07f91465ccbd82868c587f8182bc/test/test-complete.ts#L27. const TABLES_SCHEMA = Object.fromEntries( new Map( TABLES_DATA.map((table) => { return [table.name, table.columns]; }) ).entries() ); ``` But there are a number of papercuts with it - it's not escaping table names with spaces (likely be fixable from the data being passed into the view) but mainly it doesn't seem to autocomplete columns. I think it might only want to do it when you first type the table name from my read of https://github.com/codemirror/lang-sql/blob/ebf115fffdbe07f91465ccbd82868c587f8182bc/test/test-complete.ts#L37. It's possible I'm just passing something wrong, but it may end up being something that needs feature work upstream. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316243602 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316243602 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdEiS | bgrins 95570 | 2022-11-16T03:11:46Z | 2022-11-16T03:11:46Z | CONTRIBUTOR | Was just reviewing the SQL options and there's an upperCaseKeywords if we'd rather have SELECT vs select. Datasette seems to prefer lowercase so probably best to keep it as-is |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316041828 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316041828 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OcTRk | bgrins 95570 | 2022-11-15T23:51:35Z | 2022-11-15T23:51:35Z | CONTRIBUTOR | I experimented with autocompleting the actual schema in https://github.com/bgrins/datasette/commit/8431c98850c7a552dbcde2a4dd0c3dc942a97d25, but it would need some work (current problems with it listed in the commit message there) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1315869946 | https://github.com/simonw/datasette/pull/1893#issuecomment-1315869946 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5ObpT6 | bgrins 95570 | 2022-11-15T21:12:38Z | 2022-11-15T21:12:38Z | CONTRIBUTOR | https://github.com/Sphinxxxx/cm-resize isn't compatible with 6. There's a suggestion to try using CSS resize in https://discuss.codemirror.net/t/resizing-codemirror-6/3265/2 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1315869040 | https://github.com/simonw/datasette/pull/1893#issuecomment-1315869040 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5ObpFw | bgrins 95570 | 2022-11-15T21:11:42Z | 2022-11-15T21:11:42Z | CONTRIBUTOR | extraKeys is done - Shift+Enter is added in the helper function, and it appears that the Tab behavior now defaults to what the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1315853097 | https://github.com/simonw/datasette/pull/1893#issuecomment-1315853097 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OblMp | bgrins 95570 | 2022-11-15T20:55:40Z | 2022-11-15T20:55:40Z | CONTRIBUTOR | Should also minify the bundled output |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 |
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 3