Skip to content

Conversation

simonw
Copy link
Owner

@simonw simonw commented Apr 13, 2019

WIP for #427

@simonw
Copy link
Owner Author

simonw commented Apr 13, 2019

This has a bug which isn't being caught by the unit tests (yet) - facet suggestion suggests facets that have already been enabled:

fixtures__facetable__15_rows

There is also a test failure due to missing plugin hook documentation.

@simonw
Copy link
Owner Author

simonw commented Apr 18, 2019

It would be nice to decouple the request object from the Facet class. The request is needed for two things at the moment:

  • To decide if a specific facet bucket has been selected or not
  • To construct the toggle_url for turning the selection on or off

Can I pull those needs out of the Facet class somehow?

@russss
Copy link
Contributor

russss commented May 2, 2019

Can I pull those needs out of the Facet class somehow?

I was thinking that it might be handy for datasette to have a request object which wraps the Sanic Request. This could include the datasette-specific querystring decoding and the special_args parsing from TableView.data.

This would mean that we could expose the request object to plugin hooks without coupling them to Sanic.

@simonw
Copy link
Owner Author

simonw commented May 3, 2019

Abandoning this in favour of #445 - which contains the code from this branch but updated to incorporate recent changes in master.

@simonw simonw closed this May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants