{"html_url": "https://github.com/simonw/datasette/issues/1899#issuecomment-1318897922", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1899", "id": 1318897922, "node_id": "IC_kwDOBm6k_c5OnMkC", "user": {"value": 95570, "label": "bgrins"}, "created_at": "2022-11-17T16:32:42Z", "updated_at": "2022-11-17T16:32:42Z", "author_association": "CONTRIBUTOR", "body": "Another idea would be to just not set a min-height and allow the 1 line input to be 1 line heigh", "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/sqlite-utils/issues/510#issuecomment-1318777114", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/510", "id": 1318777114, "node_id": "IC_kwDOCGYnMM5OmvEa", "user": {"value": 7908073, "label": "chapmanjacobd"}, "created_at": "2022-11-17T15:09:47Z", "updated_at": "2022-11-17T15:09:47Z", "author_association": "CONTRIBUTOR", "body": "why close? is the only problem that the _config table that incorrectly says 4 for fts5? if so, that's still something that should be fixed", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-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/sqlite-utils/issues/510#issuecomment-1318431389", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/510", "id": 1318431389, "node_id": "IC_kwDOCGYnMM5Olaqd", "user": {"value": 1176293, "label": "ar-jan"}, "created_at": "2022-11-17T10:36:28Z", "updated_at": "2022-11-17T10:36:28Z", "author_association": "NONE", "body": "The virtual table's _config `version: 4` seems to indicate FTS5.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-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/1890#issuecomment-1317889323", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1890", "id": 1317889323, "node_id": "IC_kwDOBm6k_c5OjWUr", "user": {"value": 536941, "label": "fgregg"}, "created_at": "2022-11-17T00:47:36Z", "updated_at": "2022-11-17T00:47:36Z", "author_association": "CONTRIBUTOR", "body": "amazing! thanks @simonw ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1448143294, "label": "Autocomplete text entry for filter values that correspond to facets"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1899#issuecomment-1317873458", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1899", "id": 1317873458, "node_id": "IC_kwDOBm6k_c5OjScy", "user": {"value": 95570, "label": "bgrins"}, "created_at": "2022-11-17T00:31:07Z", "updated_at": "2022-11-17T00:31:07Z", "author_association": "CONTRIBUTOR", "body": "This is one way to fix it\r\n\r\n```patch\r\nr.html\r\ndiff --git a/datasette/static/cm-editor-6.0.1.js b/datasette/static/cm-editor-6.0.1.js\r\nindex c1fd2ab..68cf398 100644\r\n--- a/datasette/static/cm-editor-6.0.1.js\r\n+++ b/datasette/static/cm-editor-6.0.1.js\r\n@@ -22,7 +22,14 @@ export function editorFromTextArea(textarea, conf = {}) {\r\n // https://github.com/codemirror/lang-sql#user-content-sqlconfig.tables\r\n let view = new EditorView({\r\n doc: textarea.value,\r\n+\r\n extensions: [\r\n+ EditorView.theme({\r\n+ \".cm-content\": {\r\n+ // Height on cm-content ensures the editor is focusable by clicking beyond the height of the text\r\n+ minHeight: \"70px\",\r\n+ },\r\n+ }),\r\n keymap.of([\r\n {\r\n key: \"Shift-Enter\",\r\ndiff --git a/datasette/templates/_codemirror.html b/datasette/templates/_codemirror.html\r\nindex dea4710..c4629ae 100644\r\n--- a/datasette/templates/_codemirror.html\r\n+++ b/datasette/templates/_codemirror.html\r\n@@ -4,7 +4,6 @@\r\n .cm-editor {\r\n resize: both;\r\n overflow: hidden;\r\n- min-height: 70px;\r\n width: 80%;\r\n border: 1px solid #ddd;\r\n }\r\n```\r\n\r\nI 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.\r\n\r\nThe other approach would be to listen for a click on that empty region and move focus to the editor, or something", "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/pull/1898#issuecomment-1317870550", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1898", "id": 1317870550, "node_id": "IC_kwDOBm6k_c5OjRvW", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-11-17T00:27:55Z", "updated_at": "2022-11-17T00:27:55Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1898?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nBase: **92.55**% // Head: **92.55**% // No change to project coverage :thumbsup:\n> Coverage data is based on head [(`5eb4ea4`)](https://codecov.io/gh/simonw/datasette/pull/1898?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`00e233d`)](https://codecov.io/gh/simonw/datasette/commit/00e233d7a7f6443cb95fb5227c23580c48551cad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> Patch has no changes to coverable lines.\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #1898 +/- ##\n=======================================\n Coverage 92.55% 92.55% \n=======================================\n Files 35 35 \n Lines 4432 4432 \n=======================================\n Hits 4102 4102 \n Misses 330 330 \n```\n\n\n\nHelp us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n
\n\n[:umbrella: View full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1898?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). \n:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1452485922, "label": "Use DOMContentLoaded instead of load event for CodeMirror initialization"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/508#issuecomment-1297788531", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/508", "id": 1297788531, "node_id": "IC_kwDOCGYnMM5NWq5z", "user": {"value": 7908073, "label": "chapmanjacobd"}, "created_at": "2022-10-31T22:54:33Z", "updated_at": "2022-11-17T15:11:16Z", "author_association": "CONTRIBUTOR", "body": "Maybe this is actually a problem in the python sqlite bindings. Given [SQLITE's stance on this](https://www.sqlite.org/invalidutf.html) they should probably use `encode('utf-8', 'surrogatepass')`. As far as I understand the error here won't actually be resolved by this PR as-is. We would need to modify the data with `surrogateescape`... :/ or modify the sqlite3 module to use `surrogatepass`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1430563092, "label": "Allow surrogates in parameters"}, "performed_via_github_app": null}