Repository navigation
Todo
Labels
enhancementNew feature or request
Description
Is your feature request related to a problem? Please describe.
- An application needs a page per record, not only lists. Today a row opens in a modal with every column in one list.
Why this is needed
- An application needs a page per record, not only lists. Today a row opens in a modal with every column in one list, so a case cannot show its documents, relations and history side by side.
- buildiq parity: buildiq's
detailpage; the feature comparison says Tables "lacks as a page" and needs a row by its id, relations both ways, files on rows, audit per row and locks. - Plan: moves to user review 2, after the design (Design of the detail page and form page of an application #3434). The sidebar (Sidebar of the detail page with files, relations and activity #3436), the related rows widget (Related rows widget #3447), audit and lock state (Show the audit trail and the lock on the detail page #3448) and acceptance path 5 build on it.
Describe the solution you'd like
- A page type that shows one row of a table: a header with the row's title column, and a widget grid with widgets that read from that row, such as its fields and its metadata.
Diagram
flowchart TD
L[list or data widget] --> O[open a row]
O --> A["address of the detail page with the row id (new)"]
A --> R{can the user read the row?}
R -- no --> X[404]
R -- yes --> H[header with the row's title column]
H --> G[widget grid bound to the row]
G --> DW["data widget: the row's fields"]
G --> MW["metadata widget: creator and dates"]
Acceptance Criteria
- A detail page belongs to one table of the application and opens at an address with the row id. Uuids stay out of this address: inside one instance the id is enough, as agreed on UUIDs for rows #3093.
- Widgets on the page can bind to the current row; a data widget shows the row's fields, a metadata widget its creator and dates.
- A row the user cannot read answers 404.
- Lists and data widgets can open a row in its detail page.
- Export and import carry the page type.
- Unit tests, a Playwright spec that opens a row from a list.
- Creating or changing a detail page goes through the page routes, which declare
#[RequirePermission]for managing the application, and the service checks the same right before it writes. A test runs every write as a reader and expects 403. - Widgets on the page show only the columns the reader may read.
- The table a page is bound to is stored in a new nullable column on
tables_contexts_page. Migration order: new columns nullable, backfill, then NOT NULL, then the index, with no empty-string default (Oracle stores''as NULL), as on Technical name for tables and applications, CRUD routes by application and table #3094. The version inappinfo/info.xmlis bumped. Where an index is added, write timings before and after go into the benchmark (Benchmark the rows API on a table of 100k rows #3424). - When the bound table is deleted or taken out of the application, the binding is cleared in the same transaction and the page shows an empty state, the way widget sources are cleared today (
WidgetService::deleteSourcesByNodeRelIds). - The header uses
NcBreadcrumbs(feat(NcBreadcrumbs): accept the breadcrumbs as data nextcloud-libraries/nextcloud-vue#9141) back to the list. - Usable at 360 px wide: nothing cut off and no horizontal scroll of the page. Every action works with the keyboard alone.
Components
- CnDetailPage (rewrite, week 46): rewritten as the detail page type: the row by its id, the table's columns as its schema, the header and the widget grid. Presence and lifecycle are dropped; locks come with Show the audit trail and the lock on the detail page #3448 and the sidebar with Sidebar of the detail page with files, relations and activity #3436.
- CnObjectDataWidget (rewrite, week 48): rewritten as the data widget of the detail page: the fields of the current row, from the Tables columns the reader may read.
- CnObjectMetadataWidget (adapt, week 48): the metadata widget: creator, created and last edited of the current row (
createdBy,createdAt,lastEditBy,lastEditAt), mapped from the Tables row instead of OpenRegister's@self. - CnDetailWidgetHost (adapt, week 46): renders one widget of the detail page, in a card or without frame inside a tab, so the page and the tabs widget share one dispatch.
- CnDetailGrid (adapt, week 46): the label and value grid that shows a row's fields and metadata.
- CnSummaryAggregates (adapt, week 48): count, sum and average chips in the page header over rows related to the current row; waits for the aggregation endpoint (Q9).
- CnWidgetGrid (adapt, week 46): a grid of slots with a column count per slot from the page config, the slots of the detail page.
Out of scope
- The sidebar: Sidebar of the detail page with files, relations and activity #3436.
- Related rows: Related rows widget #3447.
- Audit trail and lock state: Show the audit trail and the lock on the detail page #3448.
- Editing in place and detail pages on public shares.
Describe alternatives you've considered
Questions for maintainers
- Which address opens a row? Options: (a) the application's address plus the page slug plus the row id, (b) a Tables-wide row address that finds a detail page. We would go with (a): one row can have different detail pages in different applications. (b) can redirect to (a) later, for reference URLs.
- What happens when the bound table goes? Options: (a) the page stays with its binding cleared, (b) the page is deleted with it. We would go with (a), as widget sources work today: a builder may rebind it.
- One detail page per table per application, or several? Options: (a) one, (b) several, chosen per list. We would go with (a), so "open a row" is never ambiguous.
Additional context
Linking to other objects
- Object: a page of a new type, bound to one table of the application, and the address of one row on it.
- Today: rows have no reference URL or preview;
lib/Reference/ReferenceHelper.phpmatches#/table/{id}and#/view/{id}only. Row uuids come with feat(rows): add persistent UUIDv7 identifiers to rows #3229 (UUIDs for rows #3093), for import, export and other instances only. - What this issue must do: make the detail page address by id stable, so it can become the row's reference URL that a reference provider resolves. A row link then renders in Text and Talk, and the Smart Picker can return a row to the link store of Link a row to objects in other apps: mails, Deck cards, files, rows of other tables #3468. Use the same read check for the page and for that reference, and leave room in the sidebar for the row's links.
Relevant files:
Related issues
- UUIDs for rows #3093
- depends on the design (Design of the detail page and form page of an application #3434)
- Link a row to objects in other apps: mails, Deck cards, files, rows of other tables #3468
Drafted with AI assistance from the project plan; @remko48 reviews it. Part of #3419.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity