observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.57k stars 123 forks source link

Default workspace selection to first value #1625

Open mootari opened 2 months ago

mootari commented 2 months ago

In the workspace selection we sort workspaces by role and name, but default the selection to the first unsorted value. Example:

image

Because this selection may appear arbitrary to users, we should instead preselect the first option in the list.

mbostock commented 2 months ago

Maybe it would be better to make the API smarter about what the default workspace should be? Like, it could be the one you most recently deployed to?

mootari commented 2 months ago

Sounds good to me! Ideally we also show a hint like "you recently deployed to" to explain the default.

I'll file a PR to have /cli/user return the additional metadata.