html_url,issue_url,id,node_id,user,user_label,created_at,updated_at,author_association,body,reactions,issue,issue_label,performed_via_github_app https://github.com/simonw/datasette/issues/690#issuecomment-709497595,https://api.github.com/repos/simonw/datasette/issues/690,709497595,MDEyOklzc3VlQ29tbWVudDcwOTQ5NzU5NQ==,9599,simonw,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}",573755726,Mechanism for plugins to add action menu items for various things, https://github.com/simonw/datasette/issues/690#issuecomment-709498425,https://api.github.com/repos/simonw/datasette/issues/690,709498425,MDEyOklzc3VlQ29tbWVudDcwOTQ5ODQyNQ==,9599,simonw,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}",573755726,Mechanism for plugins to add action menu items for various things, https://github.com/simonw/datasette/issues/690#issuecomment-709499944,https://api.github.com/repos/simonw/datasette/issues/690,709499944,MDEyOklzc3VlQ29tbWVudDcwOTQ5OTk0NA==,9599,simonw,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}",573755726,Mechanism for plugins to add action menu items for various things, https://github.com/simonw/datasette/issues/690#issuecomment-709500715,https://api.github.com/repos/simonw/datasette/issues/690,709500715,MDEyOklzc3VlQ29tbWVudDcwOTUwMDcxNQ==,9599,simonw,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}",573755726,Mechanism for plugins to add action menu items for various things, https://github.com/simonw/datasette/issues/878#issuecomment-709502889,https://api.github.com/repos/simonw/datasette/issues/878,709502889,MDEyOklzc3VlQ29tbWVudDcwOTUwMjg4OQ==,9599,simonw,2020-10-15T18:14:34Z,2020-10-15T18:14:34Z,OWNER,"The `BaseView` class does this for Datasette internals at the moment, but I'm not convinced it works as well as it could. I'd like to turn this into a class that is documented and available to plugins as well.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",648435885,"New pattern for views that return either JSON or HTML, available for plugins", https://github.com/simonw/datasette/issues/878#issuecomment-709503359,https://api.github.com/repos/simonw/datasette/issues/878,709503359,MDEyOklzc3VlQ29tbWVudDcwOTUwMzM1OQ==,9599,simonw,2020-10-15T18:15:28Z,2020-10-15T18:15:28Z,OWNER,I think this is blocking #619,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",648435885,"New pattern for views that return either JSON or HTML, available for plugins", https://github.com/simonw/datasette/issues/894#issuecomment-709505147,https://api.github.com/repos/simonw/datasette/issues/894,709505147,MDEyOklzc3VlQ29tbWVudDcwOTUwNTE0Nw==,9599,simonw,2020-10-15T18:18:45Z,2020-10-15T18:50:50Z,OWNER,"This needs querystring parameter design. Some options: * `?_sort_clause=cast(mycol+as+integer)` and `?_sort_clause_desc=cast(mycol+as+integer)` - allowing any expression. This would need to be disabled if arbitrary SQL was turned off, similar to the restrictions on `?_where=`. * `?_sort_numeric=mycol` and `?_sort_numeric_desc=mycol` - this would cast to `real` which would work on integer values as well. It could be allowed even when arbitrary SQL was disabled.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709505608,https://api.github.com/repos/simonw/datasette/issues/894,709505608,MDEyOklzc3VlQ29tbWVudDcwOTUwNTYwOA==,9599,simonw,2020-10-15T18:19:35Z,2020-10-15T18:19:35Z,OWNER,"I could even let plugins define new sort types. Imagine a plugin that enables this: `?_sort_date_desc=mycol` - where it knows how to handle specific date formats, or even uses `dateutil.parser.parse`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709505953,https://api.github.com/repos/simonw/datasette/issues/894,709505953,MDEyOklzc3VlQ29tbWVudDcwOTUwNTk1Mw==,9599,simonw,2020-10-15T18:20:13Z,2020-10-15T18:20:13Z,OWNER,Sorting by date when the column has a junk date format in it is such a column need it should maybe ship in Datasette by default - though I've been trying to avoid adding heavy dependencies like `dateutil` if I can get away with it.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709509635,https://api.github.com/repos/simonw/datasette/issues/894,709509635,MDEyOklzc3VlQ29tbWVudDcwOTUwOTYzNQ==,9599,simonw,2020-10-15T18:24:57Z,2020-10-15T18:24:57Z,OWNER,"This does feel like a weird plugin hook just because there aren't really THAT many different use-cases that plugins could solve. The ones I can think of are: - Sort numeric - Sort by parsed date - Sort by FTS rank Could this work if I just allow `_sort_clause=`? One possible solution for the no-arbitrary-SQL case: users can define sort orders in `metadata.json/yml`. So if you want to enable sort-by-distance without enabling arbitrary SQL you could add something like this: ```yaml databases: mydb: tables: museums: sort_clause: bm25(fts) ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709510422,https://api.github.com/repos/simonw/datasette/issues/894,709510422,MDEyOklzc3VlQ29tbWVudDcwOTUxMDQyMg==,9599,simonw,2020-10-15T18:26:25Z,2020-10-15T18:26:25Z,OWNER,"There's something interesting about figuring out which sort options should be offered in the column actions menu. Two options: - Try to detect if a text column is all-integers or all-floats, either by scanning the entire table (if it's small enough) or by scanning the first X rows, where X might be the size of the first page or maybe the first 1,000 or similar. - Could also let users define this in `metadata.yml` for the table.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709511399,https://api.github.com/repos/simonw/datasette/issues/894,709511399,MDEyOklzc3VlQ29tbWVudDcwOTUxMTM5OQ==,9599,simonw,2020-10-15T18:28:09Z,2020-10-15T18:28:09Z,OWNER,"The simplest solution would be for Python code to scan all of the visible values on the current page and show the column action for ""sort by this numeric"" based purely on that. I already do that in the JavaScript for ""are there any blank values in the first page?"" here: https://github.com/simonw/datasette/blob/4f7c0ebd85ccd8c1853d7aa0147628f7c1b749cc/datasette/static/table.js#L106-L118 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709513483,https://api.github.com/repos/simonw/datasette/issues/894,709513483,MDEyOklzc3VlQ29tbWVudDcwOTUxMzQ4Mw==,9599,simonw,2020-10-15T18:31:56Z,2020-10-15T18:31:56Z,OWNER,"I think the first version of this feature involves implementing `?_sort_numeric=col` and `?_sort_numeric_desc=col` plus the JavaScript to detect if those values should be shown in the column actions menu. One question: how to reflect that this is happening in the current sort UI. This menu here for example: And this interface: how should it indicate that a text is currently sorted numerically v.s. sorted alphabetically, and allow the user to switch from one to the other? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709524123,https://api.github.com/repos/simonw/datasette/issues/894,709524123,MDEyOklzc3VlQ29tbWVudDcwOTUyNDEyMw==,9599,simonw,2020-10-15T18:50:25Z,2020-10-15T18:50:25Z,OWNER,"For the ""Sort by X"" select menu case... I could automatically expand that menu to contain extra options for ""Sort numerically by X"" for each TEXT column in the table. That's a pretty good option. For the action cog menu, I can add the extra options to the cog menu - and rely on the fact that the title of the page will say ""Sorted numerically by colname descending"".","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709525082,https://api.github.com/repos/simonw/datasette/issues/894,709525082,MDEyOklzc3VlQ29tbWVudDcwOTUyNTA4Mg==,9599,simonw,2020-10-15T18:51:59Z,2020-10-15T18:51:59Z,OWNER,This is enough of a design to build a working prototype.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",657572753,?sort=colname~numeric to sort by by column cast to real, https://github.com/simonw/datasette/issues/894#issuecomment-709531343,https://api.github.com/repos/simonw/datasette/issues/894,709531343,MDEyOklzc3VlQ29tbWVudDcwOTUzMTM0Mw==,9599,simonw,2020-10-15T19:03:12Z,2020-10-15T19:03:12Z,OWNER,"The Sort by `