Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .changeset/35955-list-changes-are-drafts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@object-ui/app-shell': patch
'@object-ui/i18n': patch
'@object-ui/plugin-list': patch
---

feat(console): a change on a list is a draft, with Discard and Save

Clause-②: yes (widening) — new `console.objectView.draft.*` keys in every `@object-ui/i18n` locale pack (`discard`, `discardTitle`, `save`, `heading`, `partSeparator`, `saveToView`, `saveAsMyView`, `copyName`, `saved`); nothing removed or renamed
Metadata-protocol: none

On a Console object list, a header sort, a filter change, grouping, the search, Hide Fields, an added field and a column drag apply at once and are now a draft: they are kept nowhere. They used to be saved at once into the reader's own list preference (`sys_user_preference`, key `ui.list.<object>`) and followed them to every device.

- While the list holds a draft, **Discard** and **Save** sit at the end of the condition row, where the 「Personalized · Reset to view」 marker was. On a narrow list or a phone they fold into one **Save** whose menu also holds Discard.
- **Save** names what is unsaved and offers **Save to this view** (on a view of the reader's own) and **Save as my view**, which asks a name first (the view's name with "copy"), saves the draft as a new view of the reader's own and opens it. Either says "Saved", and the buttons go while the conditions stay.
- **Discard** puts the list back as its view declares it and removes the list's `uf_*` parameters from the address bar.
- Where the reader may not save (no personal view can be created or updated), both faces are Discard alone.
- The draft survives opening a record (as a page or in the side panel) and coming back. Opening another view or object, or reloading the list's page, drops it. A reload of another page does not drop the state an in-app link to a list carries.
- Column widths, the row height and the views' order are not a draft. They are still remembered for the reader in the same `ui.list.<object>` row.

Upgrade note: a sort, filter, search, column order, hidden column or added column that an earlier Console stored in a reader's `ui.list.<object>` row no longer applies; the list opens as its view declares it. Nothing stored is deleted by this change; a later column-width change rewrites that row's column state with the widths alone. A reader who wants such a list kept saves it as a view of their own.

Saving into a shared view, and saving the Display panel's layout and row colour, are not offered yet. `@object-ui/plugin-list` changes only its README, which now describes added fields as part of the draft. No metadata key, value or default changes.
38 changes: 22 additions & 16 deletions content/docs/ui/views.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -619,24 +619,30 @@ reader's right-column and panel choices on it, are described in

### A user's list state never writes the view

A header sort, a column drag or resize, a filter change, a density change, Hide Fields
and a Manage Views drag are saved for that user (`sys_user_preference`, key
`ui.list.<object>`), never to the view metadata, so they work even where the tenant's
metadata is read-only. What you author (`sort`, filters, columns, `rowHeight`,
`hiddenFields`, the views' order) is the default for every user with no state of their own.

- A link carrying list state (`uf_*` parameters) wins over the stored state.
A header sort, a filter change, grouping, the search, Hide Fields, an added field and a
column drag apply at once and are a **draft**: they are kept nowhere and never write the
view metadata, so they work even where the tenant's metadata is read-only. While the list
holds a draft, **Discard** and **Save** sit at the end of the condition row (one **Save**
whose menu also holds Discard on a narrow list or a phone).

- **Save** names what is unsaved and keeps the sort, filters, columns and hidden fields:
**Save to this view** on a view of the user's own, or **Save as my view**, which asks a
name first (the view's name with "copy") and then opens the new view. Either says
"Saved", and the buttons go while the conditions stay.
- **Discard** puts the list back as its view declares it, the Display panel's layout and row
color included, and removes the list's `uf_*` parameters from the address bar.
- The draft survives opening a record and coming back. Opening another view or object,
or reloading the list's page, drops it, so that reload opens the view as it is declared.
- Column widths, the row height (density) and the views' order are not a draft: they are
remembered for the user (`sys_user_preference`, key `ui.list.<object>`). A sort, filter,
column order or hidden column an earlier Console stored there no longer applies.
- A link carrying list state (`uf_*` parameters) applies it as a draft, whether it opens in a
new tab or in-app (an AI answer's list link, after a reload of the chat page too).
- When a session ends, the sign-in page's return link keeps the list's path but never its
`uf_*` state, so whoever signs in next opens their own stored state or the view's default.
`uf_*` state, so whoever signs in next opens the view's default.
- A user's hidden fields only subtract from the columns the view shows, never add one.
- While a user's list differs from the view, a **Personalized** marker sits beside the list
title (an icon alone on a phone). Opening it names what differs: filters, search, sort,
grouping, column layout, hidden fields, density, and the Display panel's layout, row
color and inline editing. Its **Reset to view** is the one way back: it
drops the active view's stored state and cached search, and removes the list's `uf_*`
parameters from the address bar, so the list is the view's own again after a reload too.
Pinned views, favorites, how records open and a "View all" link's `filter[...]` scope are
not list state and stay. Nothing about the marker is configurable.
- Pinned views, favorites, how records open and a "View all" link's `filter[...]` scope are
not part of a draft and stay. Nothing about Discard and Save is configurable.

### A view the user may not open

Expand Down
Loading
Loading