Skip to content

feat(grid): show and edit grid views on their own page - #19

Open
remko48 wants to merge 8 commits into
stack/g5-widget-formsfrom
stack/g6-grid-view-page
Open

remko48 wants to merge 8 commits into
stack/g5-widget-formsfrom
stack/g6-grid-view-page

Conversation

@remko48

@remko48 remko48 commented Oct 12, 2026

Copy link
Copy Markdown
Member

A grid view now opens as a page: its widgets on the grid, with an edit mode to add, configure, move, resize and remove widgets.

What changes

  • GridView page: "Edit page" works on a copy of the grid; "Save" sends the whole grid in one update and "Cancel" throws the copy away. The server validates the grid on save (see the earlier backend PR).
  • GridViewSettings dialog: create a grid view (title, emoji, description, optional technical name) or edit those fields on an existing one. Editing a grid view from its menu opens this dialog instead of the table view settings.
  • /view/{id} shows the grid page for a grid view; only users who can manage the view see the edit button.
  • Navigation: grid views get their own icon, and actions that only make sense for rows (row count, duplicate, import) are hidden for them. Grid views are left out of the normal view lists, because they belong to an application's menu (later stack) rather than to a table.
  • Store: insertStandaloneView creates a view through POST /api/2/views. Reloading the tables no longer drops shared views and views without a table from the store.

🖼️ Screenshots

🏚️ Before 🏡 After
|

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@remko48
remko48 added this pull request to stack #15 October 12, 2026 08:34
@remko48
remko48 force-pushed the stack/g6-grid-view-page branch 3 times, most recently from d2e4b1e to 66dde06 Compare October 12, 2026 11:56

@remko48 remko48 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (Thorough, round 2)

Each finding is an inline comment on the line it is about, marked 🔴 Blocker / 🟡 Concern / 🟢 Minor. This round takes the updated base stack into account (#13, #14 and #16 fixes, including 2ebf8c7, 2da6fa5 and 777c1b0); the diff of this PR itself is unchanged since it was rebased.

✅ Resolved by the base — saving no longer re-checks every target. 2da6fa5 keeps a target that matches the stored grid by widget id without checking the saver's access, and marks it broken if it is gone. GridView keeps widget ids, and SchemaForm writes targets as { type, id } in the stored key order, so the exemption applies. The only exception is the #18 blocker, which resets the target.

What was verified

  • Read the full diff against stack/g5-widget-forms, and confirmed it is byte-identical to round 1.
  • Traced the legacy ViewController::update → ViewUpdateInput → ViewService::update path for technicalName, plus buildDefaultTechnicalName on create (2ebf8c7).
  • Checked the new ApiViewsController::create signature (777c1b0).
  • Checked canManageElement / canManageTable for views without a table.
  • Grepped every emitter and listener of the new events, in g6 and in stack/m1–m4.
  • Checked updateView's error handling, the loadContextView path that View.vue uses, and the commit trailers.

Not run

eslint, stylelint, build, any tests, the app. Nothing was reproduced; every finding is from reading the code.

Comment thread src/modules/modals/GridViewSettings.vue Outdated
Comment thread src/modules/modals/GridViewSettings.vue Outdated
Comment thread src/modules/modals/Modals.vue Outdated
Comment thread src/modules/modals/GridViewSettings.vue Outdated
Comment thread src/store/store.js Outdated
Comment thread src/modules/grid/GridView.vue
Comment thread src/modules/grid/GridView.vue Outdated
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div class="grid-view" data-cy="grid-view">

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Concern — No end-to-end coverage for the page flow

data-cy hooks were added throughout, but no Playwright spec uses them. The suite exists and already uses data-cy 514 times.

Impact: edit → add → configure → save → reload has no regression guard. That is exactly the path the #18 blocker and the technical-name blocker break.

Suggested fix: one Playwright spec covering that flow, including editing the grid view's title.

Comment thread src/modules/grid/GridView.vue Outdated
Comment thread src/modules/modals/Modals.vue Outdated
Comment thread src/modules/grid/GridView.vue Outdated
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 <ruben@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
@remko48
remko48 force-pushed the stack/g6-grid-view-page branch from 66dde06 to 5d8e00b Compare October 12, 2026 13:09
@github-actions github-actions Bot added the AI assisted This PR contains AI-assisted commits label Oct 12, 2026
…om the navigation

- the grid view dialog no longer sends a technical name, which the server
  refuses for a view without a table, and only sends the fields the create
  endpoint takes; its fields are labelled and Submit is disabled while saving
- grid views get their own list in the navigation, with an action to create
  one, so the create flow has an entry point
- leaving a grid page with unsaved changes asks first, and the browser warns
  before closing the tab
- loading the tables keeps shared views and grid views but drops views of
  tables that are gone again
- the grid page imports the layout helpers from gridLayout.js, disables move
  steps that cannot apply and hides them on a narrow canvas
- a Playwright spec covers creating, editing, configuring and saving a page

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Comment thread src/modules/grid/GridView.vue Outdated
@remko48

remko48 commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

🟡 Concern — The PR description no longer matches the code

After 213235a the description says the opposite of what the PR does in two places:

  • GridViewSettings: it still lists an "optional technical name". The dialog no longer has one; a grid view is named by its id.
  • Navigation: it still says grid views "are left out of the normal view lists, because they belong to an application's menu". They now get their own "Grid views" list in the navigation, with a create action.

Impact: reviewers and the changelog get the wrong picture, and showing grid views in the navigation is a visible product change that the description should state.

Suggested fix: update both bullets. Also mention the guard for unsaved changes and the new Playwright spec.

…instance

The draft, the stored grid, the unsaved-changes check and the discard
confirmation live in setup(), so the route guards use them directly and the
options API reads the same state, without getCurrentInstance().

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Signed-off-by: Remko <remko@conduction.nl>
…type select in the e2e test

- the grid views list now follows the applications, which the Cypress
  helper for creating an application addresses as the second list
- the Playwright spec opens the widget type select from its indicator, like
  the other specs do, instead of clicking the component root

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
…test

Escape only reaches the type select, which keeps the focus after a pick, so the dialog stayed open.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant