{"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-844970776", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 844970776, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NDk3MDc3Ng==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-20T10:40:25Z", "updated_at": "2021-05-20T10:40:25Z", "author_association": "NONE", "body": "Any chance you could push a new datasette release with the updated dependencies in the setup.py, @simonw?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842499728", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842499728, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5OTcyOA==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-17T17:24:30Z", "updated_at": "2021-05-17T17:24:30Z", "author_association": "NONE", "body": "> I wonder if there are any new 3.0 features we should be taking advantage of here that would justify pinning to 3.0 minimum?\r\n\r\nThe changelog reads like bug fixes and removal of deprecated parts to me", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842495820", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842495820, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NTgyMA==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-17T17:18:05Z", "updated_at": "2021-05-17T17:18:05Z", "author_association": "NONE", "body": "Wow, you are _fast_!\r\n\r\nI didn't notice dependabot had opened a PR already. I was about to.\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": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/983#issuecomment-753600999", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/983", "id": 753600999, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzYwMDk5OQ==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-01-03T11:11:21Z", "updated_at": "2021-01-03T11:11:21Z", "author_association": "NONE", "body": "With regards to JS/Browser events, given your example of menu items that plugins could add, I could imagine this code to work:\r\n\r\n```js\r\n// as part of datasette\r\ndatasette.events.AddMenuItem = 'DatasetteAddMenuItemEvent';\r\ndocument.addEventListener(datasette.events.AddMenuItem, (e) => {\r\n // do whatever is needed to add the menu item. Data comes from `e`\r\n alert(e.title + ' ' + e.link);\r\n});\r\n\r\n// as part of a plugin\r\nconst event = new Event(datasette.events.AddMenuItem, {link: '/foo/bar', title: 'Go somewhere'});\r\nDocument.dispatchEvent(event)\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 712260429, "label": "JavaScript plugin hooks mechanism similar to pluggy"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1144#issuecomment-744489028", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1144", "id": 744489028, "node_id": "MDEyOklzc3VlQ29tbWVudDc0NDQ4OTAyOA==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2020-12-14T14:47:11Z", "updated_at": "2020-12-14T14:47:11Z", "author_association": "NONE", "body": "Thanks for opening the issue, @simonw. Let me elaborate on my Tweets.\r\n\r\n[datasette-chartjs](https://github.com/MarkusH/datasette-chartjs) provides drop down lists to pick the chart visualization (e.g. bar, line, doughnut, pie, ...) as well as the column used for the \"x axis\" (e.g. time).\r\n\r\nA user can change the values on-demand. The chart will be redrawn w/o querying the database again.\r\n\r\nHowever, if a user wants to change the underlying query, they will use the SQL field provided by datasette or any of the other datasette built-in features to amend a query. In order to maintain a user's selections for the plugin, datasette-chartjs copies some parts of [datasette-vega](https://github.com/simonw/datasette-vega) which persist the chosen visualization and column in the hash part of a URL (the stuff behind the `#`). The plugin load the config from the hash upon initialization on the next page and use it accordingly.\r\n\r\nAdditionally, datasette-vega and datasette-chartjs need to make sure to include the hash in all links and forms that cause a reload of the page. This is, such that the config persists between clicks.\r\n\r\nThis ticket is about moving thes parts into datasette that provide the functionality to do so. This includes:\r\n\r\n1. a way to load config options with a given prefix from the current URL hash\r\n1. a way to update the current URL hash with a new config value or a bunch of config options\r\n1. updating all necessary links and forms on the current page to include the URL hash whenever its updated\r\n1. to prevent leaking config options to external pages, only \"internal\" links should be updated\r\n\r\nThere's another, optional, feature that we might want to think about during the design phase: the scope of the config. Links within a datasette instance have 1 of 3 scopes:\r\n\r\n1. global, for the whole datasette project\r\n1. database, for all tables in a database\r\n1. table, only for a table within a database\r\n\r\nWhen updating the links and forms as pointed out in 3. above, it might be worth considering which links need to be updated. I could imagine a plugin that wants to persist some setting across all tables within a database but another setting only within a table.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 765637324, "label": "JavaScript to help plugins interact with the fragment part of the URL"}, "performed_via_github_app": null}