{"html_url": "https://github.com/simonw/datasette/issues/1901#issuecomment-1319528359", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1901", "id": 1319528359, "node_id": "IC_kwDOBm6k_c5Opmen", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T04:27:00Z", "updated_at": "2022-11-18T04:27:00Z", "author_association": "OWNER", "body": "Also `datasette-indieauth` https://github.com/simonw/datasette-indieauth/blob/a08ce67ddad6098b1240adbeff37d040e4df53b1/datasette_indieauth/templates/indieauth.html#L5-L10", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1453813400, "label": "Some plugins show \"home\" breadcrumbs twice in the top left"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1897#issuecomment-1319533445", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1897", "id": 1319533445, "node_id": "IC_kwDOBm6k_c5OpnuF", "user": {"value": 95570, "label": "bgrins"}, "created_at": "2022-11-18T04:38:03Z", "updated_at": "2022-11-18T04:38:03Z", "author_association": "CONTRIBUTOR", "body": "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", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452457263, "label": "Serve schema JSON to the SQL editor to enable autocomplete"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319641636", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319641636, "node_id": "IC_kwDOBm6k_c5OqCIk", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T07:27:26Z", "updated_at": "2022-11-18T07:27:26Z", "author_association": "NONE", "body": "Can confirm that my `uname -a` returns something different at the end:\r\n\r\n```\r\nroot:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64\r\n```\r\n\r\nI'm in `arm64` land, you're in `x86_64`. I am admittedly very fuzzy on how this factors into Docker these days. Honestly thought this was one of the things Docker was suppose to help address. \ud83e\udd14", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319583703", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319583703, "node_id": "IC_kwDOBm6k_c5Opz_X", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T05:58:31Z", "updated_at": "2022-11-18T05:58:31Z", "author_association": "OWNER", "body": "Could you provide full steps to reproduce plus a SpatiaLite database file that triggered this for you? I'm not able to recreate the problem.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1899#issuecomment-1319642338", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1899", "id": 1319642338, "node_id": "IC_kwDOBm6k_c5OqCTi", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T07:28:28Z", "updated_at": "2022-11-18T07:28:28Z", "author_association": "OWNER", "body": "Demo: https://latest.datasette.io/fixtures", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452495049, "label": "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 "}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319583281", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319583281, "node_id": "IC_kwDOBm6k_c5Opz4x", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T05:57:44Z", "updated_at": "2022-11-18T05:57:44Z", "author_association": "OWNER", "body": "Did you use the `--spatialite` option?\r\n\r\nI just tried this:\r\n\r\n datasette package nps-spatialite.db\r\n\r\nIt built the image OK (I didn't see the error you reported), but running the container failed with an error:\r\n\r\n```\r\n/tmp % docker run -p 8001:8001 7298e8e6bbfb\r\nUsage: datasette serve [OPTIONS] [FILES]...\r\nTry 'datasette serve --help' for help.\r\n\r\nError: It looks like you're trying to load a SpatiaLite database without first loading the SpatiaLite module.\r\n\r\nRead more: https://docs.datasette.io/en/stable/spatialite.html\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452572348, "label": "datasette package --spatialite throws error during build"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1901#issuecomment-1319588163", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1901", "id": 1319588163, "node_id": "IC_kwDOBm6k_c5Op1FD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T06:05:11Z", "updated_at": "2022-11-18T06:05:11Z", "author_association": "OWNER", "body": "For `datasette-copyable` I want to show breadcrumbs that take database/instance permissions into account, so I'm removing `{% block nav %}` entirely and replacing it with this:\r\n\r\n```html+jinja\r\n{% block crumbs %}\r\n{{ crumbs.nav(request=request, database=database, table=table) }}\r\n{% endblock %}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1453813400, "label": "Some plugins show \"home\" breadcrumbs twice in the top left"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1896#issuecomment-1320588299", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1896", "id": 1320588299, "node_id": "IC_kwDOBm6k_c5OtpQL", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T22:16:59Z", "updated_at": "2022-11-18T22:17:06Z", "author_association": "OWNER", "body": "Found myself needing an `await db.view_exists()` method for this, similar to the existing `await db.table_exists()` one.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452364777, "label": "Extract logic for resolving a URL to a database / table / row"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1901#issuecomment-1319482791", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1901", "id": 1319482791, "node_id": "IC_kwDOBm6k_c5OpbWn", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T03:01:36Z", "updated_at": "2022-11-18T03:01:36Z", "author_association": "OWNER", "body": "Good catch. Looks like that bug was introduced by this change: https://github.com/simonw/datasette/commit/1a5e5f2aa951e5bd731067a49819efba68fbe8ef\r\n\r\nFrom:\r\n\r\n- https://github.com/simonw/datasette/issues/1831\r\n\r\nThe search all plugin includes this code which interacts poorly with that refactor:\r\n\r\nhttps://github.com/simonw/datasette-search-all/blob/847b55c368a285e4567627029624d7872ee75cac/datasette_search_all/templates/search_all.html#L31-L36\r\n\r\n```html+jinja\r\n{% block nav %}\r\n
\r\n home\r\n
\r\n {{ super() }}\r\n{% endblock %}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1453813400, "label": "Some plugins show \"home\" breadcrumbs twice in the top left"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1901#issuecomment-1319627012", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1901", "id": 1319627012, "node_id": "IC_kwDOBm6k_c5Op-kE", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T07:07:03Z", "updated_at": "2022-11-18T07:07:03Z", "author_association": "OWNER", "body": "Here's the full list of 10 plugin releases for this issue:\r\n\r\n* [datasette-search-all 1.1.1](https://github.com/simonw/datasette-search-all/releases/tag/1.1.1)\r\n* [datasette-ripgrep 0.7.1](https://github.com/simonw/datasette-ripgrep/releases/tag/0.7.1)\r\n* [datasette-socrata 0.3.1](https://github.com/simonw/datasette-socrata/releases/tag/0.3.1)\r\n* [datasette-configure-fts 1.1.1](https://github.com/simonw/datasette-configure-fts/releases/tag/1.1.1)\r\n* [datasette-edit-templates 0.2](https://github.com/simonw/datasette-edit-templates/releases/tag/0.2)\r\n* [datasette-copyable 0.3.2](https://github.com/simonw/datasette-copyable/releases/tag/0.3.2)\r\n* [datasette-public 0.2.1](https://github.com/simonw/datasette-public/releases/tag/0.2.1)\r\n* [datasette-import-table 0.3.1](https://github.com/simonw/datasette-import-table/releases/tag/0.3.1)\r\n* [datasette-indieauth 1.2.2](https://github.com/simonw/datasette-indieauth/releases/tag/1.2.2)\r\n* [datasette-edit-schema 0.5.2](https://github.com/simonw/datasette-edit-schema/releases/tag/0.5.2)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1453813400, "label": "Some plugins show \"home\" breadcrumbs twice in the top left"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1899#issuecomment-1319584553", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1899", "id": 1319584553, "node_id": "IC_kwDOBm6k_c5Op0Mp", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T06:00:10Z", "updated_at": "2022-11-18T06:01:50Z", "author_association": "OWNER", "body": "I can't actually remember where that `min-height: 70px` came from. I just tried without it and it seems fine - especially since any time you add a newline in the editor it increases its height to fit.\r\n\r\nI ran this in the DevTools console:\r\n\r\n```javascript\r\ndocument.querySelector('.cm-editor').style.minHeight = 'none';\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452495049, "label": "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 "}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1897#issuecomment-1319478811", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1897", "id": 1319478811, "node_id": "IC_kwDOBm6k_c5OpaYb", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T02:53:57Z", "updated_at": "2022-11-18T02:53:57Z", "author_association": "OWNER", "body": "I decided to just go for the view names, not their columns.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452457263, "label": "Serve schema JSON to the SQL editor to enable autocomplete"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/510#issuecomment-1320394127", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/510", "id": 1320394127, "node_id": "IC_kwDOCGYnMM5Os52P", "user": {"value": 1176293, "label": "ar-jan"}, "created_at": "2022-11-18T18:37:51Z", "updated_at": "2022-11-18T18:37:51Z", "author_association": "NONE", "body": "I guess it is not incorrect when it says the version is `4`, though it is confusing. Maybe it doesn't even refer to FTS4/FTS5 versions, but something else? In any case, it's not related to sqlite-utils, but SQLite itself.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1434911255, "label": "Cannot enable FTS5 despite it being available"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1891#issuecomment-1320625260", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1891", "id": 1320625260, "node_id": "IC_kwDOBm6k_c5OtyRs", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T23:01:03Z", "updated_at": "2022-11-18T23:01:48Z", "author_association": "OWNER", "body": "I think this actually needs to include a whole section of the documentation about the road to 1.0 - what to expect (planned breaking changes) etc. I can add that to the https://docs.datasette.io/en/stable/contributing.html page perhaps - or even create a Roadmap page.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1450303205, "label": "1.0a0 release notes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1863#issuecomment-1320563197", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1863", "id": 1320563197, "node_id": "IC_kwDOBm6k_c5OtjH9", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-11-18T21:47:35Z", "updated_at": "2022-11-18T21:48:07Z", "author_association": "OWNER", "body": "Incomplete implementation of this view:\r\n```python\r\nclass RowUpdateView(BaseView):\r\n name = \"row-update\"\r\n\r\n def __init__(self, datasette):\r\n self.ds = datasette\r\n\r\n async def post(self, request):\r\n database_route = tilde_decode(request.url_vars[\"database\"])\r\n table = tilde_decode(request.url_vars[\"table\"])\r\n try:\r\n db = self.ds.get_database(route=database_route)\r\n except KeyError:\r\n return _error([\"Database not found: {}\".format(database_route)], 404)\r\n\r\n database_name = db.name\r\n if not await db.table_exists(table):\r\n return _error([\"Table not found: {}\".format(table)], 404)\r\n\r\n pk_values = urlsafe_components(request.url_vars[\"pks\"])\r\n\r\n sql, params, pks = await row_sql_params_pks(db, table, pk_values)\r\n results = await db.execute(sql, params, truncate=True)\r\n rows = list(results.rows)\r\n if not rows:\r\n return _error([f\"Record not found: {pk_values}\"], 404)\r\n\r\n # Ensure user has permission to update this row\r\n if not await self.ds.permission_allowed(\r\n request.actor, \"update-row\", resource=(database_name, table)\r\n ):\r\n return _error([\"Permission denied\"], 403)\r\n\r\n body = await request.post_body()\r\n try:\r\n data = json.loads(body)\r\n except json.JSONDecodeError as e:\r\n return _error([\"Invalid JSON: {}\".format(e)])\r\n if not isinstance(data, dict):\r\n return _error([\"JSON must be a dictionary\"])\r\n\r\n def update_row(conn):\r\n sqlite_utils.Database(conn)[table].update(pk_values, updates)\r\n\r\n await db.execute_write_fn(update_row)\r\n result = {\"ok\": True}\r\n if data.get(\"return\"):\r\n result[\"row\"] = {\"row-here\": \"TODO\"}\r\n return Response.json(result, status=200)\r\n```\r\nThis is before the refactor in:\r\n- #1896", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1425029242, "label": "Update a single record in an existing table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1900#issuecomment-1319596087", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1900", "id": 1319596087, "node_id": "IC_kwDOBm6k_c5Op3A3", "user": {"value": 419145, "label": "rdmurphy"}, "created_at": "2022-11-18T06:16:33Z", "updated_at": "2022-11-18T06:16:33Z", "author_association": "NONE", "body": "Interesting! So I tried this locally using your copy of `nps-spatialite.db` and I got the same error. \ud83e\udd14\r\n\r\n```\r\n\u276f datasette package nps-spatialite.db --spatialite\r\n[+] Building 27.5s (10/10) FINISHED \r\n => [internal] load build definition from Dockerfile 0.0s\r\n => => transferring dockerfile: 622B 0.0s\r\n => [internal] load .dockerignore 0.0s\r\n => => transferring context: 2B 0.0s\r\n => [internal] load metadata for docker.io/library/python:3.11.0-slim-bullseye 0.9s\r\n => [internal] load build context 2.3s\r\n => => transferring context: 72.38MB 2.3s\r\n => CACHED [1/6] FROM docker.io/library/python:3.11.0-slim-bullseye@sha256:1cd45c5dad845af18d71745c017325725dc979571c1bbe625b67e6051533716c 0.0s\r\n => [2/6] COPY . /app 0.1s\r\n => [3/6] WORKDIR /app 0.0s\r\n => [4/6] RUN apt-get update && apt-get install -y python3-dev gcc libsqlite3-mod-spatialite && rm -rf /var/lib/apt/lists/* 18.5s\r\n => [5/6] RUN pip install -U datasette 4.9s\r\n => ERROR [6/6] RUN datasette inspect nps-spatialite.db --inspect-file inspect-data.json 0.7s \r\n------ \r\n > [6/6] RUN datasette inspect nps-spatialite.db --inspect-file inspect-data.json: \r\n#10 0.681 Traceback (most recent call last): \r\n#10 0.681 File \"/usr/local/bin/datasette\", line 8, in