[KongchangAI]
· 1 min read· 959 words

Datasette 1.0a47 Released: Drag-and-Drop Column Ordering and Custom Related-Row Labels

Datasette 1.0a47 Released: Drag-and-Drop Column Ordering and Custom Related-Row Labels

Datasette 1.0a47 focuses on the table page experience, unifying related-row display and supporting column ordering and label templates.

Datasette 1.0a47 is an update focused on table page browsing. It aligns many-to-one related-row presentation with many-to-many rows, allows relationship and regular columns to be freely interleaved, supports direct drag-and-drop column reordering on desktop, and saves order to the URL and localStorage for both sharing and personal preference. Related-row labels gain multi-column templates like {first_name} {last_name} and can be configured in the UI without editing config files. It does not touch the query engine or API, optimizing readability and operability around data presentation and collaboration.

Datasette creator Simon Willison has released version 1.0a47, an update that focuses on the browsing experience of table pages—with notable changes to how relational data is presented, how freely column order can be adjusted, and how related-row labels can be customized. For anyone who regularly uses Datasette to explore databases, these changes directly affect day-to-day usability.

Datasette 1.0a47 release information

The new version gives "many-to-one" related rows the same presentation on table pages as "many-to-many" rows. This change builds on the earlier Datasette 1.046, where many-to-many relationships had already adopted the new display logic. Now both types of relationships converge visually and interactively, so users no longer need to switch mental models when browsing different tables.

Column order can be freely interleaved

Previously, relationship columns were fixed at the end of the table, and users could not interleave related fields with regular fields. 1.0a47 removes that restriction, allowing relationship columns to be mixed in with regular table content. For wide tables with many fields, this means the relationship fields you look at most often can be moved toward the front.

Direct drag-and-drop on desktop

On desktop browsers, adjusting column order no longer requires opening a separate sorting modal—you can simply drag column headers. The official release includes a short video demo of the new column-ordering interface: during dragging, the relative positions of columns update in real time, making the interaction path much shorter than the previous modal approach.

Order written to the URL and localStorage

The new column order is reflected in the page URL, so when you share a link, the recipient sees the same column layout. At the same time, the order is saved to the browser's localStorage, so when you return to the same table later, your previous preference is automatically remembered. Together, these two features make the column layout both a shareable state and a personalized persistent setting.

localStorage is a local key-value store provided by browsers, typically with a capacity of a few MB. Data does not disappear when the page is closed and is not automatically sent to the server. Datasette writes the column order into URL query parameters so the link itself carries the layout state; it also writes the same order into localStorage as the default when the user visits again. The two have different priorities: explicit parameters in the URL usually override local memory, ensuring that shared links display the sender's layout, while local storage only takes effect when there are no URL parameters. This combination is common in data exploration tools, balancing collaborative sharing with personal habits.

Previously, the display label for related rows relied on a single field provided by the name or column table. 1.0a47 introduces a template mechanism that can be written as {first_name} {last_name}, combining multiple columns into the label content. For tables where a single field cannot distinguish records, this capability solves the problem of related rows being hard to identify.

Label templates can also be configured directly in the UI, so ordinary users can customize how different tables appear as related rows without editing configuration files. The shift from "editing code" to "clicking in the UI" lowers the barrier to this kind of customization.

Here, "related rows" refers to rows in a table that point to another table via a foreign key. By default, Datasette uses the referenced table's primary key or a specified column as the link text. The name table is an optional metadata table defined by Datasette convention, used to specify a "human-readable name" for other tables; column is used to specify a column as the label source. Both require the label to come from a single field, which is insufficient for scenarios that need to concatenate names, IDs, or composite identifiers. The template mechanism {first_name} {last_name} is essentially lightweight string interpolation, combining values from multiple columns into display text in a specified format, so there is no longer any need to create a separate view or change the schema just for labels.

What these changes mean

Looking at the feature list, 1.0a47 does not involve changes to the query engine or API layer; everything focuses on the readability and operability of table pages. This fits Datasette's consistent product philosophy: the value of a data exploration tool lies not only in being able to query data, but also in how the queried data is presented.

Remembering and sharing column order, and multi-column templates for related-row labels, are both designed around the scenario of "the same data, seen by different people." The former makes layout part of collaboration, while the latter lets related records themselves carry more identifiable information. Together, they reduce the cost of repeatedly locating things in wide tables and complex relationship structures.

As an alpha version before 1.0, these features may still be adjusted in later releases. But the direction is clear: Datasette is moving the table view from a "fixed template" toward a "user-orchestratable interface."

One-line Summary

Datasette 1.0a47 focuses on the table page experience, unifying related-row display and supporting column ordering and label templates.

Paragraph Summary

Datasette 1.0a47 is an update focused on the browsing experience of table pages. It makes many-to-one related rows use the same presentation as many-to-many rows, allows relationship columns and regular columns to be freely interleaved, enables direct drag-and-drop of column headers on desktop to adjust order, and writes the order to the URL and localStorage, balancing sharing and personal preference. Related-row labels gain multi-column templates like {first_name} {last_name} and can be configured in the UI without editing configuration files. Overall, it does not touch the query engine or API, but optimizes readability and operability around data presentation and collaboration scenarios.

#Datasette#Datasette 1.0a47#column sorting#related rows#label templates#localStorage#data exploration
Share:

Related articles