{"html_url": "https://github.com/simonw/datasette/issues/1860#issuecomment-1293912781", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1860", "id": 1293912781, "node_id": "IC_kwDOBm6k_c5NH4rN", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-27T18:31:15Z", "updated_at": "2022-10-27T18:31:15Z", "author_association": "NONE", "body": "Here is my suggestion:\r\n\r\n`^\\s*((?:\\-\\-.*?\\n\\s*)|(?:/\\*.*?(?=\\*/)\\*/\\s*))*select\\b`\r\n\r\nSee the following test: https://regex101.com/r/Doeqqa/1\r\n\r\nAnd here I played all your tests: https://regexr.com/713ir\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1424378012, "label": "SQL query field can't begin by a comment"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1860#issuecomment-1293863145", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1860", "id": 1293863145, "node_id": "IC_kwDOBm6k_c5NHsjp", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-27T17:43:37Z", "updated_at": "2022-10-27T17:43:37Z", "author_association": "NONE", "body": "Sorry I forgot the `-- comments like that`.\r\n\r\nI'm afraid there is an issue in your regexp, see: https://regex101.com/r/pyubJf/1\r\n\r\nI guess I can fix it.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1424378012, "label": "SQL query field can't begin by a comment"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1860#issuecomment-1292390996", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1860", "id": 1292390996, "node_id": "IC_kwDOBm6k_c5NCFJU", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-26T17:43:41Z", "updated_at": "2022-10-26T17:43:41Z", "author_association": "NONE", "body": "I guess the issue is here: https://github.com/simonw/datasette/blob/9676b2deb07cff20247ba91dad3e84a4ab0b00d1/datasette/utils/__init__.py#L209\r\n\r\nHere is a working regexp allowing it:\r\n```diff\r\n- re.compile(r\"^select\\b\"),\r\n+ re.compile(r\"^\\s*(/\\*.+?(?=\\*/)\\*/\\s*)*select\"),\r\n```\r\n`^\\s*`: beginning by 0 or an infinite number of \\s (spaces, tabs, newlines...)\r\n`(/\\*.+?(?=\\*/)\\*/\\s*)*`: 0 or an infinite number of chars beginning by `/*` and ending to the next occurrence of `*/` followed by 0 or an infinite number of \\s\r\n\r\nYou can play with the regexp here: https://regex101.com/r/aESXDL/3\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1424378012, "label": "SQL query field can't begin by a comment"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1824#issuecomment-1268398461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1824", "id": 1268398461, "node_id": "IC_kwDOBm6k_c5Lmjl9", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-05T12:55:05Z", "updated_at": "2022-10-05T12:55:05Z", "author_association": "NONE", "body": "Here is some working javascript code. There might be better solution, I'm not a JS expert.\r\n```javascript\r\n var show_hide = document.querySelector(\".show-hide-sql > a\");\r\n\r\n // Hide SQL query if the URL opened with #_hide_sql\r\n var hash = window.location.hash;\r\n if(hash === \"#_hide_sql\") {\r\n hide_sql();\r\n }\r\n show_hide.setAttribute(\"href\", \"#\");\r\n show_hide.addEventListener(\"click\", toggle_sql_display);\r\n\r\n function toggle_sql_display() {\r\n if (show_hide.innerText === \"hide\") {\r\n hide_sql();\r\n return;\r\n }\r\n if (show_hide.innerText === \"show\") {\r\n show_sql();\r\n return;\r\n }\r\n }\r\n\r\n function hide_sql() {\r\n sql_element.style.cssText=\"display:none\";\r\n show_hide.innerHTML = \"show\";\r\n show_hide.setAttribute(\"href\", \"#_hide_sql\");\r\n }\r\n\r\n function show_sql() {\r\n sql_element.style.cssText=\"display:block\";\r\n show_hide.innerHTML = \"hide\";\r\n show_hide.setAttribute(\"href\", \"#_show_sql\");\r\n }\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1387712501, "label": "Convert &_hide_sql=1 to #_hide_sql"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1805#issuecomment-1265161668", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1805", "id": 1265161668, "node_id": "IC_kwDOBm6k_c5LaNXE", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-03T09:18:05Z", "updated_at": "2022-10-03T09:18:05Z", "author_association": "NONE", "body": "> I'm tempted to add `word-wrap: anywhere` only to links that are know to be longer than a certain threshold.\r\n\r\nMake sense IMHO.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1363552780, "label": "truncate_cells_html does not work for links?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/596#issuecomment-1238383171", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/596", "id": 1238383171, "node_id": "IC_kwDOBm6k_c5J0DpD", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-09-06T16:27:25Z", "updated_at": "2022-09-06T16:27:25Z", "author_association": "NONE", "body": "Perhaps some ways to address this.\r\n\r\n1. Add a **horizontal scrollbar at the top of the table**. There are some solutions here: https://stackoverflow.com/questions/3934271/horizontal-scrollbar-on-top-and-bottom-of-table\r\n2. Use a **fixed table header**. It would be useful when you're lost in the middle of a very big table. Pure CSS solutions seem to exist: https://stackoverflow.com/questions/21168521/table-fixed-header-and-scrollable-body\r\n3. Maybe a possibility to resize columns. Not sure about that because it would more work not to lose it after each reload.\r\n4. A way to keep **favorite views for each user**. The process would be: I select the column I want or not (with existing \"settings\" icon of each column); then I select a \"favoritize view\" option somewhere; then I can recall all my favorite views from a menu. These data could be hosted on the browser.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 507454958, "label": "Handle really wide tables better"}, "performed_via_github_app": null}