Add a supported extension API for collection list-view tabs #17954
cbratschi
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the Feature
Plugins can add custom collection views, but there is no supported way to append navigation tabs beside Payload’s built-in All, Hierarchy/Folders, and Trash tabs.
DefaultListViewis public, but it hardcodesCollectionListHeader. The internalDefaultListViewTabscomponent is not exported, and the availablebeforeList,afterList, table, menu-item, and view-action slots do not render inside the list-header tab group.Current Workaround
A plugin that adds a custom collection subview must either replace and reproduce the list header or render
DefaultListViewand inject a tab afterward using a DOM portal and private selectors such as.list-header__actionsand.default-list-view-tabs.Custom subviews must separately duplicate Payload’s built-in tab URLs, labels, active states, folder/hierarchy handling, trash handling, and styles.
Proposed Direction
Add a supported list-view tab composition point. This could be a collection configuration slot such as
admin.components.views.list.tabs, or a public composableDefaultListViewTabsAPI together with a way forDefaultListView/CollectionListHeaderto append custom tabs.Useful tab context would include the collection slug/config, current view type, and whether the view is rendered inside a drawer. Custom tabs should be excluded from drawers by default.
I would be happy to implement the preferred API and add focused tests once the desired shape is agreed.
All reactions