From 5d8e00b5e64e0859492f7c320d243aef548e0f2a Mon Sep 17 00:00:00 2001 From: Remko Date: Mon, 12 Oct 2026 10:29:52 +0200 Subject: [PATCH 1/5] feat(grid): show and edit grid views on their own page A grid view opens as a page of widgets. In edit mode widgets are added, configured, moved and removed, and the whole grid is saved at once. A dialog creates a grid view or edits its title, description and technical name. - grid views are kept out of the table view lists in the navigation - views without a table survive a reload of the tables in the store Co-authored-by: Ruben van der Linde Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Remko --- src/modules/grid/GridView.vue | 285 ++++++++++++++++++ src/modules/modals/GridViewSettings.vue | 181 +++++++++++ src/modules/modals/Modals.vue | 22 +- .../partials/NavigationViewItem.vue | 11 +- .../navigation/sections/Navigation.vue | 4 +- src/pages/View.vue | 15 + src/store/store.js | 19 +- 7 files changed, 530 insertions(+), 7 deletions(-) create mode 100644 src/modules/grid/GridView.vue create mode 100644 src/modules/modals/GridViewSettings.vue diff --git a/src/modules/grid/GridView.vue b/src/modules/grid/GridView.vue new file mode 100644 index 0000000000..3be5c81a58 --- /dev/null +++ b/src/modules/grid/GridView.vue @@ -0,0 +1,285 @@ + + + + + + diff --git a/src/modules/modals/GridViewSettings.vue b/src/modules/modals/GridViewSettings.vue new file mode 100644 index 0000000000..f3c1020a29 --- /dev/null +++ b/src/modules/modals/GridViewSettings.vue @@ -0,0 +1,181 @@ + + + + + + diff --git a/src/modules/modals/Modals.vue b/src/modules/modals/Modals.vue index 2738943b84..7b55ed19a1 100644 --- a/src/modules/modals/Modals.vue +++ b/src/modules/modals/Modals.vue @@ -35,6 +35,12 @@ :view-setting="viewToEdit?.viewSetting" @close="viewToEdit = null" /> + +import { emit } from '@nextcloud/event-bus' import { useEventBusSubscriptions } from '../../shared/composables/useEventBusSubscriptions.js' import CreateRow from './CreateRow.vue' import ImportScheme from './ImportScheme.vue' @@ -76,6 +83,7 @@ import CreateTable from './CreateTable.vue' import DeleteView from './DeleteView.vue' import EditTable from './EditTable.vue' import EditContext from './EditContext.vue' +import GridViewSettings from './GridViewSettings.vue' import TransferTable from './TransferTable.vue' import CreateContext from './CreateContext.vue' import TransferContext from './TransferContext.vue' @@ -85,6 +93,7 @@ import ImportContextScheme from './ImportContextScheme.vue'; export default { components: { EditTable, + GridViewSettings, DeleteView, CreateTable, Import, @@ -118,6 +127,7 @@ export default { editRow: null, rowsToDelete: null, viewToEdit: null, + gridView: null, showModalCreateTable: false, showModalCreateContext: false, importToElement: null, @@ -145,7 +155,14 @@ export default { // views this.subscribeToEventBus('tables:view:reload', () => { this.reload(true) }) - this.subscribeToEventBus('tables:view:edit', view => { this.viewToEdit = { ...view, createView: false } }) + this.subscribeToEventBus('tables:view:edit', view => { + if (view?.view?.type === 'grid') { + this.gridView = { view: view.view, contextId: null } + return + } + this.viewToEdit = { ...view, createView: false } + }) + this.subscribeToEventBus('tables:view:create-grid', payload => { this.gridView = { view: null, contextId: payload?.contextId ?? null } }) this.subscribeToEventBus('tables:view:create', tableInfos => { this.viewToEdit = { view: { tableId: tableInfos.tableId, sort: [], filter: [] }, @@ -182,6 +199,9 @@ export default { }, methods: { + emitGridViewCreated(payload) { + emit('tables:view:grid-created', payload) + }, onSaveNewColumn(event) { if (this.createColumnInfo?.onSave) { this.createColumnInfo.onSave(event) diff --git a/src/modules/navigation/partials/NavigationViewItem.vue b/src/modules/navigation/partials/NavigationViewItem.vue index 001f95cb1d..2625ba73a8 100644 --- a/src/modules/navigation/partials/NavigationViewItem.vue +++ b/src/modules/navigation/partials/NavigationViewItem.vue @@ -13,13 +13,16 @@ +