cldellow / datasette-ui-extras

Add editing UI and other power-user features to Datasette.
Apache License 2.0
12 stars 1 forks source link

search omnibox #16

Closed cldellow closed 1 year ago

cldellow commented 1 year ago

When we have stats for the table in dux_column_stats, let's enhance the search box to help users build structured queries.

We'll render it if it's absent -- extra_template_vars could pass supports_search=True).

The spirit of what I want, using https://dux.fly.dev/superuser/posts as an example:

Typing linu suggests:

Typing 2022 (or 2022-01-08, or 2022-03, with language tweaked as needed) suggests:

Prioritizing the options to show might be hard--probably want max 10 (this is what google.com uses). We'll try to do something reasonable about which columns to include (maybe we should use the currently displayed columns as a starting point?), and we should let the user override the default case.

cldellow commented 1 year ago

Not going to work on this anytime soon, so closing

cldellow commented 1 year ago

I think all the backend pieces are available now, and I'm kind of excited by the possibilities, so re opening.

cldellow commented 1 year ago

I've got a start on this - everything except dates are handled. I'm going to see how often I want dates in practice before implementing thme