{"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996034408", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996034408, "node_id": "IC_kwDOBm6k_c47Xkdo", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:37:37Z", "updated_at": "2021-12-16T17:37:37Z", "author_association": "OWNER", "body": "I think you're right! I had completely forgotten that piece of code.\r\n\r\nThis just turned into a bug fix and a documentation update. Thanks for the research!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996045776", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996045776, "node_id": "IC_kwDOBm6k_c47XnPQ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:52:54Z", "updated_at": "2021-12-16T17:52:54Z", "author_association": "OWNER", "body": "I tried that fix you suggested and now this `metadata.json` does the right thing:\r\n```json\r\n{\r\n \"databases\": {\r\n \"fixtures\": {\r\n \"tables\": {\r\n \"facetable\": {\r\n \"facets\": [\r\n {\r\n \"array\": \"tags\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n }\r\n}\r\n```\r\nIt does further highlight the bug in #625 though - since then if you try to add `?_facet=tags` to facet by tags treating them NOT as an array your request to do so is ignored.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996046304", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996046304, "node_id": "IC_kwDOBm6k_c47XnXg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:53:40Z", "updated_at": "2021-12-16T18:16:12Z", "author_association": "OWNER", "body": "I'm also not convinced that this configuration syntax is right. It's a bit weird having a `\"facets\"` list that can either by column-name-strings or `{\"type-of-facet\": \"column-name\"}` objects. Maybe there's a better design for this?\r\n\r\nPart of the problem here is that facets were designed to accept optional extra configuration - partly to support `m2m` facets in #495 - but I haven't actually shipped any facets that use that ability.\r\n\r\nFacet by delimiter would be a good one to exercise that ability:\r\n- #510", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996076373", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996076373, "node_id": "IC_kwDOBm6k_c47XutV", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:35:40Z", "updated_at": "2021-12-16T18:35:40Z", "author_association": "OWNER", "body": "I'm going to ship your fix now, but I'm not going to add this to the documentation yet because I hope to improve the design prior to Datasette 1.0.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996077053", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996077053, "node_id": "IC_kwDOBm6k_c47Xu39", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:36:41Z", "updated_at": "2021-12-16T18:36:41Z", "author_association": "OWNER", "body": "... actually no, I WILL document this, because not documenting this is what got us to this point in the first place!", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 1, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996084899", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996084899, "node_id": "IC_kwDOBm6k_c47Xwyj", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:48:14Z", "updated_at": "2021-12-16T18:48:14Z", "author_association": "OWNER", "body": "Updated documentation: https://github.com/simonw/datasette/blob/20a2ed6bec367d2f6759be4a879364a72780b59d/docs/facets.rst#facets-in-metadatajson", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996093884", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996093884, "node_id": "IC_kwDOBm6k_c47Xy-8", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:00:28Z", "updated_at": "2021-12-16T19:00:28Z", "author_association": "OWNER", "body": "Implementing #1552 has made a fix for this bug even more important.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996100774", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996100774, "node_id": "IC_kwDOBm6k_c47X0qm", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:10:01Z", "updated_at": "2021-12-16T19:10:48Z", "author_association": "OWNER", "body": "I think the problem here may be in the design of the JSON returned by facets. It looks like this:\r\n```\r\n \"facet_results\": {\r\n \"tags\": {\r\n \"name\": \"tags\",\r\n \"type\": \"array\",\r\n \"results\": [...],\r\n \"hideable\": false,\r\n \"toggle_url\": \"/fixtures/facetable.json?_facet=tags&_trace=1&_nosuggest=1\",\r\n \"truncated\": false\r\n },\r\n \"created\": {\r\n \"name\": \"created\",\r\n \"type\": \"date\",\r\n \"results\": [...]\r\n```\r\nThe problem then is that the `tags` key is over-ridden by the second facet with a different type against the same column name!\r\n\r\nhttps://latest-with-plugins.datasette.io/fixtures/facetable?_trace=1&_facet=created&_facet_date=created&_facet_array=tags&_facet=tags confirms that the SQL queries for those facets are being executed - but the final JSON doesn't show them on https://latest-with-plugins.datasette.io/fixtures/facetable.json?_trace=1&_facet=created&_facet_date=created&_facet_array=tags&_facet=tags\r\n\r\nThey're not available in the template context either: https://latest-with-plugins.datasette.io/fixtures/facetable?_facet=created&_facet_date=created&_facet_array=tags&_facet=tags&_context=1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1553#issuecomment-996103956", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1553", "id": 996103956, "node_id": "IC_kwDOBm6k_c47X1cU", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:14:38Z", "updated_at": "2021-12-16T19:14:38Z", "author_association": "OWNER", "body": "This is a really interesting idea - kind of similar to how many APIs include custom HTTP headers informing of rate-limits.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 1, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1079111498, "label": "if csv export is truncated in non streaming mode set informative response header"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1556#issuecomment-996104214", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1556", "id": 996104214, "node_id": "IC_kwDOBm6k_c47X1gW", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:15:00Z", "updated_at": "2021-12-16T19:15:28Z", "author_association": "OWNER", "body": "Demo: https://latest.datasette.io/fixtures/facetable?_facet=planet_int&_facet=_city_id&_facet=created#facet-created\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": 1081318247, "label": "Show count of facet values always, not just for `?_facet_size=max`"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1557#issuecomment-996115949", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1557", "id": 996115949, "node_id": "IC_kwDOBm6k_c47X4Xt", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:30:55Z", "updated_at": "2021-12-16T19:30:55Z", "author_association": "OWNER", "body": "Demo: compare https://latest.datasette.io/fixtures/facetable?_facet=_city_id&_nosuggest=1 to https://latest.datasette.io/fixtures/facetable?_facet=_city_id\r\n\r\nDocumentation: bottom of https://docs.datasette.io/en/latest/json_api.html#special-table-arguments", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1082564912, "label": "`?_nosuggest=1` parameter for disabling facet suggestions on table view"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996118401", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996118401, "node_id": "IC_kwDOBm6k_c47X4-B", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:34:28Z", "updated_at": "2021-12-16T19:34:55Z", "author_association": "OWNER", "body": "The big question here is do I break any existing clients of the `\"facet_results\"` JSON API?\r\n\r\nIt's still pre-1.0 so I could break them, but I've also built my own code against this in the past so it's likely other people have too.\r\n\r\nIf I don't break them, I will instead need to come up with a naming convention for those keys - something like `\"tags__array\"` for example. As well as a way to ensure that a column called `tags__array` doesn't end up conflicting with the `tags__array` key!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996119954", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996119954, "node_id": "IC_kwDOBm6k_c47X5WS", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:36:01Z", "updated_at": "2021-12-16T19:36:11Z", "author_association": "OWNER", "body": "Datasette's own HTML rendering code doesn't actually use the keys in `facet_results` - it instead loops through `sorted_facet_results` which is defined like this: https://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/views/table.py#L937-L941\r\n\r\nAnd used like this:\r\n\r\nhttps://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/templates/table.html#L154-L156", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996121736", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996121736, "node_id": "IC_kwDOBm6k_c47X5yI", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:37:08Z", "updated_at": "2021-12-16T19:37:08Z", "author_association": "OWNER", "body": "Really `facet_results` here should be an array of objects, not an object that maps poorly designed string keys to those objects.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996130862", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996130862, "node_id": "IC_kwDOBm6k_c47X8Au", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:44:48Z", "updated_at": "2021-12-16T19:44:48Z", "author_association": "OWNER", "body": "Decision: as an initial fix I'm going to de-duplicate those keys by using `tags__array` etc - with a `_2` on the end if that key is already used.\r\n\r\nI'll open a separate issue to redesign this better for Datasette 1.0.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1558#issuecomment-996134716", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1558", "id": 996134716, "node_id": "IC_kwDOBm6k_c47X888", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:46:21Z", "updated_at": "2021-12-16T19:46:21Z", "author_association": "OWNER", "body": "The flaw in the current design is illustrated by this example:\r\n\r\n```\r\n \"facet_results\": {\r\n \"tags\": {\r\n \"name\": \"tags\",\r\n \"type\": \"array\",\r\n \"results\": [...],\r\n \"hideable\": false,\r\n \"toggle_url\": \"/fixtures/facetable.json?_facet=tags&_trace=1&_nosuggest=1\",\r\n \"truncated\": false\r\n },\r\n \"created\": {\r\n \"name\": \"created\",\r\n \"type\": \"date\",\r\n \"results\": [...]\r\n```\r\nThis was the cause of the bug in #625 - the each of those objects is keyed by the name of the column, which left no room for faceting the same column once by date and once by column value.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1082584499, "label": "Redesign `facet_results` JSON structure prior to Datasette 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996146762", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996146762, "node_id": "IC_kwDOBm6k_c47X_5K", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:51:44Z", "updated_at": "2021-12-16T19:51:44Z", "author_association": "OWNER", "body": "Here's where `facet_results` is built up: https://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/views/table.py#L752-L758\r\n\r\nSo the decision to key things based on column name is actually embedded deep in the existing facet classes here:\r\n\r\nhttps://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/facets.py#L224-L226\r\n\r\nhttps://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/facets.py#L395-L397\r\n\r\nhttps://github.com/simonw/datasette/blob/992496f2611a72bd51e94bfd0b17c1d84e732487/datasette/facets.py#L510-L512", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996149720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996149720, "node_id": "IC_kwDOBm6k_c47YAnY", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:56:14Z", "updated_at": "2021-12-16T19:56:14Z", "author_association": "OWNER", "body": "This bad design is even covered in the plugin hooks documentation: https://docs.datasette.io/en/0.59.4/plugin_hooks.html#register-facet-classes\r\n\r\nIt does at least have the following warning:\r\n\r\n> **Warning**\r\n>\r\n> The design of this plugin hook is unstable and may change. See [issue 830](https://github.com/simonw/datasette/issues/830).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996150904", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996150904, "node_id": "IC_kwDOBm6k_c47YA54", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:57:52Z", "updated_at": "2021-12-16T19:57:52Z", "author_association": "OWNER", "body": "Good news - GitHub's new code search doesn't show ANYONE using that plugin hook - not surprising since it has that documentation warning plus it's just not a very clearly usable hook: https://cs.github.com/?scopeName=All+repos&scope=&q=register_facet_classes%20-repo%3Asimonw%2Fdatasette", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/830#issuecomment-996151246", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/830", "id": 996151246, "node_id": "IC_kwDOBm6k_c47YA_O", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:58:22Z", "updated_at": "2021-12-16T19:58:22Z", "author_association": "OWNER", "body": "As of today, 16 December 2021, I'm still not seeing any evidence that anyone is using this hook (yet) according to GitHub code search: https://cs.github.com/?scopeName=All+repos&scope=&q=register_facet_classes%20-repo%3Asimonw%2Fdatasette", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 636511683, "label": "Redesign register_facet_classes plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996152213", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996152213, "node_id": "IC_kwDOBm6k_c47YBOV", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T19:59:46Z", "updated_at": "2021-12-16T20:00:05Z", "author_association": "OWNER", "body": "Since no-one is using that plugin hook I'm going to alter its contract slightly. I'll still keep the existing JSON format working though (until 1.0), since it's much more likely that people are using that JSON somewhere.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996161380", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996161380, "node_id": "IC_kwDOBm6k_c47YDdk", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T20:13:05Z", "updated_at": "2021-12-16T20:13:05Z", "author_association": "OWNER", "body": "I updated the example code in the facet plugin hook documentation: https://github.com/simonw/datasette/blob/95d0dd7a1cf6be6b7da41e1404184217eb93f64a/docs/plugin_hooks.rst#register_facet_classes", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996165659", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996165659, "node_id": "IC_kwDOBm6k_c47YEgb", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T20:19:53Z", "updated_at": "2021-12-16T20:19:53Z", "author_association": "OWNER", "body": "Demo of the fix: https://latest.datasette.io/fixtures/facetable?_facet=created&_facet_date=created&_facet=tags&_facet_array=tags#facet-tags", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/625#issuecomment-996170510", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/625", "id": 996170510, "node_id": "IC_kwDOBm6k_c47YFsO", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T20:27:41Z", "updated_at": "2021-12-16T20:27:41Z", "author_association": "OWNER", "body": "And here's the new JSON: https://latest.datasette.io/fixtures/facetable.json?_facet=created&_facet_date=created&_facet=tags&_facet_array=tags&_nosuggest=1\r\n\r\n```\r\n{\r\n \"database\": \"fixtures\",\r\n \"table\": \"facetable\",\r\n \"is_view\": false,\r\n \"human_description_en\": \"\",\r\n ...\r\n \"facet_results\": {\r\n \"created\": {\r\n \"name\": \"created\",\r\n \"type\": \"column\",\r\n ...\r\n },\r\n \"tags\": {\r\n \"name\": \"tags\",\r\n \"type\": \"column\",\r\n ...\r\n },\r\n \"created_2\": {\r\n \"name\": \"created\",\r\n \"type\": \"date\",\r\n ...\r\n },\r\n \"tags_2\": {\r\n \"name\": \"tags\",\r\n \"type\": \"array\",\r\n ...\r\n }\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": 520740741, "label": "If you apply ?_facet_array=tags then &_facet=tags does nothing"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/357#issuecomment-996179930", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/357", "id": 996179930, "node_id": "IC_kwDOCGYnMM47YH_a", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T20:43:19Z", "updated_at": "2021-12-16T20:43:19Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1079422215, "label": "pytest-runner is not required"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1558#issuecomment-996204369", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1558", "id": 996204369, "node_id": "IC_kwDOBm6k_c47YN9R", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T21:23:25Z", "updated_at": "2021-12-16T21:23:25Z", "author_association": "OWNER", "body": "Related: Following the fix for #625 I noticed that `facets_timed_out` gives you just the column name, but doesn't let you know which particular type of facet (`date` or `array` for example) suffered the timeout: https://github.com/simonw/datasette/blob/0d4145d0f4d8b2a7edc1ba4aac1be56cd536a10a/datasette/facets.py#L269-L270\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1082584499, "label": "Redesign `facet_results` JSON structure prior to Datasette 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1518#issuecomment-996219117", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1518", "id": 996219117, "node_id": "IC_kwDOBm6k_c47YRjt", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T21:47:51Z", "updated_at": "2021-12-16T21:49:24Z", "author_association": "OWNER", "body": "Should facets really not be displayed on pages past page one (where `?_next=` is set)? That made sense to me at the time, but I'm now having second thoughts about it.\r\n\r\nI guess it's a useful performance tweak for when crawlers keep hitting the `?_next=` link.\r\n\r\nActually it looks like facets DO display on subsequent pages, e.g. on https://global-power-plants.datasettes.com/global-power-plants/global-power-plants?_next=200 - but facet suggestions do not, thanks to this code: https://github.com/simonw/datasette/blob/2c07327d23d9c5cf939ada9ba4091c1b8b2ba42d/datasette/views/table.py#L777-L785\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1058072543, "label": "Complete refactor of TableView and table.html template"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1518#issuecomment-996225235", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1518", "id": 996225235, "node_id": "IC_kwDOBm6k_c47YTDT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T21:58:24Z", "updated_at": "2021-12-16T21:58:41Z", "author_association": "OWNER", "body": "A fundamental operation of this view is to construct the SQL query and accompanying human description based on the incoming query string parameters.\r\n\r\nThe human description is the bit at the top of https://latest.datasette.io/fixtures/searchable?_search=dog&_sort=pk&_facet=text2&text2=sara+weasel that says:\r\n\r\n> 1 row where search matches \"dog\" and text2 = \"sara weasel\" sorted by pk\r\n\r\n(Also used in the page `