List module like TYPO3's: one list per page type and element type, sidecar-defined columns, search, sort, New per list #150
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Make the List module a generic record list modelled on TYPO3's List module. For the selected page it shows one list per child page type and one list per element type used on the page. Each list has its own columns (declared by the type's sidecar), search, sort, a New button, and a view showing only that type. Nothing in it is news-specific: news items get a good list because they are a page type whose sidecar declares sensible columns.
Current behavior
web/src/components/ListModule.tsx, from #79) shows one table of the selected page's direct child pages:/api/treepayload, which carries only title, type, date, draft and weight per page, so no other front-matter field can be shown.Desired behavior
What the List shows for the selected page
hidden: trueitem children are excluded, as in the page module. Whether nested elements get rows is an open question.?type=page:news-itemor?type=element:text; the prefix keeps the page-type and element namespaces apart. Reload and Back keep it.elementsallowlist.Rows
?props=1), withreturnto the list (from #149).returnto the list.returnto the list.Search and sort
Creating
create: true. Properties then open when fields remain, per the current documented rule, and Save & close returns to the list.returnto the list. Where the element goes in the page content is an open question.Decisions
listColumns: a list of declared field/param names, plus implicit ones such as title, date and status.scaffold/site/AGENTS.mdand the README's sidecar reference are updated in the same change (CLAUDE.md rule).news-item.yamldeclares its columns (e.g. date, categories, author), so the news list keeps a date column.Key interfaces
ListModule(web/src/components/ListModule.tsx): rebuilt around lists per type.internal/server). It reads pages through the page-tree and settings machinery (internal/pagetree, the settings read ininternal/pageops) and elements through the content parser behind/api/page/elements(internal/content).internal/pagetype(Schema,LoadDir, the package doc) andinternal/element(Schema, its loader, the package doc). The new optional key is validated against the declared fields/params and the allowed implicit names.internal/server) andinternal/elemops.returnhelper and the shared page actions from #149.Acceptance criteria
news-item.yamldeclares and a "New News item" button; an empty News section still shows that list and its button.insertable: false, placement, allowlist) have no New button and are not in the "New…" menu.How to verify
go test ./...: endpoint tests (lists, columns, search, sort, creatability) and sidecar load tests for the new key.cd web && npm test: List module tests.harness serveon a site withharness add news.Assumptions to check
/api/treepayload must stay as it is: route repair and the link pickers read hidden children from it.Out of scope
Open questions
Where "date created" comes from. Deckle stores no creation time. Pages have only an optional front-matter
date(for news, the publish date); elements have nothing but a randomuid. Options:Also: for a date-ordered section such as news, should the default sort be date created or the publish
date?Where a new element lands in the page content. The list shows it on top (newest first), but it still needs a position in the content: the top or the end of which slot, and what happens when several slots accept the type?
Key name and defaults for list columns. The proposed key is
listColumns. Proposed defaults for a type that declares none:Nested elements. Do elements inside other elements get rows in their type's list, or only top-level ones?
Blocked by
dominik.polakovics referenced this issue2026-10-06 00:09:19 +02:00
Superseded by #153. On reflection, a TYPO3-style List doesn't fit Hugo. TYPO3's List shows records from uniform tables. In Hugo a page is a file, and an element is a shortcode at a position inside a page body, with no identity, metadata or creation date of its own. That is why this issue kept collecting open questions (where a creation date comes from, where a new element goes, whether nested elements get rows). The part that does map onto Hugo, a collection of pages of one type held in sections, moves into editor modules that feature bundles declare in YAML. The first is a News module, and the List module is removed (#153).