{"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683448569", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683448569, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0ODU2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:39:09Z", "updated_at": "2020-08-30T18:34:34Z", "author_association": "OWNER", "body": "So the steps needed are:\r\n\r\n- Download and extract latest CodeMirror zip file\r\n- Rename `lib/codemirror.js` to `codemirror-5.57.0.js`\r\n- Rename `lib/codemirror.css` to `codemirror-5.57.0.css`\r\n- Rename `mode/sql/sql.js` to `codemirror-5.57.0-sql.js`\r\n- Edit both JS files to make the top comment a `/* */` block\r\n- Minify JavaScript files like this:\r\n - `npx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js --comments '/LICENSE/'`\r\n - `npx uglify-js codemirror-5.57.0-sql.js -o codemirror-5.57.0-sql.min.js --comments '/LICENSE/'`\r\n- Check that the LICENSE comment did indeed survive minification\r\n- Minify CSS file like this:\r\n - `npx clean-css-cli codemirror-5.57.0.css -o codemirror-5.57.0.min.css`\r\n- Edit the `_codemirror.html` template to reference the new files\r\n- `git rm` the old files, `git add` the new files", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683452613", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683452613, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ1MjYxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T18:16:28Z", "updated_at": "2020-08-30T18:16:28Z", "author_association": "OWNER", "body": "I added documentation on how to upgrade CodeMirror for the future here: https://docs.datasette.io/en/latest/contributing.html#upgrading-codemirror", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683449804", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683449804, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0OTgwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:51:18Z", "updated_at": "2020-08-30T17:51:18Z", "author_association": "OWNER", "body": "Copy and paste on mobile safari seems to work now. #655 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683448635", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683448635, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0ODYzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:39:54Z", "updated_at": "2020-08-30T17:39:54Z", "author_association": "OWNER", "body": "I'll wait for this to deploy to https://latest.datasette.io/ and then test it in various desktop and mobile browsers.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683445704", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683445704, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0NTcwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:11:58Z", "updated_at": "2020-08-30T17:33:30Z", "author_association": "OWNER", "body": "One catch: this stripped the license information from the top of the JS.\r\n\r\nI fixed this by editing the license to be a single `/* ... */` block comment instead of multiple `//` lines and running this:\r\n\r\n npx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js --comments '/LICENSE/'\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683445114", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683445114, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0NTExNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:06:39Z", "updated_at": "2020-08-30T17:06:39Z", "author_association": "OWNER", "body": "Minifying using `npx`:\r\n```\r\nnpx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js\r\nnpx uglify-js codemirror-5.57.0-sql.js -o codemirror-5.57.0-sql.min.js\r\nnpx clean-css-cli codemirror-5.57.0.css -o codemirror-5.57.0.min.css\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-679355426", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 679355426, "node_id": "MDEyOklzc3VlQ29tbWVudDY3OTM1NTQyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-24T20:43:07Z", "updated_at": "2020-08-24T20:43:07Z", "author_association": "OWNER", "body": "It would also be interesting to try out the SQL hint mode, which can autocomplete against tables and columns. This demo shows how to configure that: https://codemirror.net/mode/sql/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-679333717", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 679333717, "node_id": "MDEyOklzc3VlQ29tbWVudDY3OTMzMzcxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-24T19:55:59Z", "updated_at": "2020-08-24T19:55:59Z", "author_association": "OWNER", "body": "CodeMirror 6 is in pre-release at the moment and is a complete rewrite. I'll stick with the 5.x series for now. https://github.com/codemirror/codemirror.next/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null}