Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Featured table(s) on the homepage #1810

Open
simonw opened this issue Sep 15, 2022 · 4 comments
Open

Featured table(s) on the homepage #1810

simonw opened this issue Sep 15, 2022 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented Sep 15, 2022

Many Datasette instances mainly exist to serve a single table - for example:

It would be neat if the / homepage of those instances could be configured to highlight that specific table.

Or maybe more than one?

@simonw
Copy link
Owner Author

simonw commented Sep 15, 2022

Twitter conversation that inspired this issue: https://twitter.com/psychemedia/status/1570410108785684481

@psychemedia
Copy link
Contributor

psychemedia commented Sep 15, 2022

A couple+ of possible use case examples:

  • someone has a collection of articles indexed with FTS; they want to publish a simple search tool over the results;
  • someone has an image collection and they want to be able to search over description text to return images;
  • someone has a set of locations with descriptions, and wants to run a query over places and descriptions and get results as a listing or on a map;
  • someone has a set of audio or video files with titles, descriptions and/or transcripts, and wants to be able to search over them and return playable versions of returned items.

In many cases, I suspect the raw content will be in one table, but the search table will be a second (eg FTS) table. Generally, the search may be over one or more joined tables, and the results constructed from one or more tables (which may or may not be distinct from the search tables).

@simonw simonw changed the title Features table(s) on the homepage Featured table(s) on the homepage Sep 15, 2022
@simonw
Copy link
Owner Author

simonw commented Sep 15, 2022

Idea: allow the user to specify one or more featured tables. Each table is then shown as a summary on the homepage - with the total number of rows and the first 5 rows. If the table has search configured there's a search box too.

If the instance has only one database with only one table (excluding hidden tables) it gets featured automatically perhaps (maybe with a way to opt-out of that if you want to).

@simonw
Copy link
Owner Author

simonw commented Sep 15, 2022

I could prototype this idea as a datasette-featured-tables plugin that delivers its own custom index.html template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants