Skip to content

feat(pages): show every application page on the grid - #38

Open
rubenvdlinde wants to merge 3 commits into
stack/p3-grid-widgetsfrom
stack/p4-grid-pages
Open

rubenvdlinde wants to merge 3 commits into
stack/p3-grid-widgetsfrom
stack/p4-grid-pages

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Collaborator

Fourth step of the page rework from nextcloud#3075 (reply: every page of an application shows on the grid, the start page is the dashboard). Stacked on #37.

What changes

  • Context.vue: the application header plus a page bar (Dashboard, the grid pages, "New page" and a page menu for managers) and GridPage for the active page. The start page is read from the page API, so an existing start page shows its tables and views full width, stacked in their order, before anyone edits it. The rendering and loading of tables moved into the data widget (TableWrapper / View as before, now also CSV export and scheme import).
  • Route /application/:contextId/page/:pageId for grid pages; /application/:contextId stays the start page. Pages are addressed by id, like the other application routes.
  • GridPage (from the grid view page of feat(grid): show and edit grid views on their own page聽nextcloud/tables#3082): edit mode with add, move, resize, configure and remove, save and cancel, a prompt before leaving with unsaved changes. Managers (application owners, as the navigation uses) get the edit controls; the server checks manage rights on every write.
  • ContextPageForm dialog to create and rename grid pages; delete asks first and returns to the dashboard.
  • Edit application dialog: the tables and views list is no longer sortable and links to "Arrange the dashboard" (opens the start page in edit mode). It now lists every node of the application, including those only on grid pages; before, a node not on the start page was missing and saving the dialog would have removed it from the application.
  • ContextService::update no longer rewrites order from the submitted node list when the start page is arranged on the grid, so the order stays the one derived from positions (test added).

Public shares, Smart Picker, reference widgets

Applications do not appear in any of them: link shares are created for tables and views only (ShareService::createLinkShare(Table|View)), and the reference provider and Smart Picker only match #/table/{id} and #/view/{id} links (ReferenceHelper::matchReference). So there is nothing to wire for pages there.

Tests

Nextcloud 34 container (PostgreSQL 16), Playwright at 1600 x 1000:

  • playwright/e2e/context-grid-pages.spec.ts (new): existing start page renders its tables in order before any edit; a header added to the start page survives a reload and the API shows order 10, 20 by position; a new grid page with a data widget for a table not in the application adds that table as a node; a sharee without manage rights sees the pages without edit controls and gets 403 creating a page. All 4 pass.
  • Existing context.spec.ts (3) and context-navigation.spec.ts (1) pass. In a parallel run, the fixture login of 3 tests timed out at the local 60 s limit; rerun with --timeout=120000 (the CI value) they pass: a slow local instance, not a failure.
  • tests/unit/Service/ContextServiceTest.php: OK (5 tests, 33 assertions); PageServiceTest and ContextMapperTest still OK.
  • npm run lint 0 errors (1 inherited warning in store.js), stylelint clean, cs:check clean, psalm No errors found!, npm run build OK.

Prepared in the Conduction fork for porting upstream by @remko48. Prepared with Claude Code.

The application shows its pages: the start page is the dashboard, read
from the page API so an existing start page shows its tables and views
full width in their order, and grid pages get a route of their own.
Managers edit a page in place (add, move, resize, configure and remove
widgets, save or cancel) and create, rename and delete grid pages.

The edit dialog no longer sorts the tables and views: it lists every
node of the application, also those only on other pages, and links to
the dashboard editor. Updating an application keeps the order of a
start page arranged on the grid. Data widgets offer the CSV export and
scheme import the start page had.

Assisted-by: ClaudeCode:claude-opus-5-5
The page form leaves the technical name optional for a new page, where the
server makes one from the title, and requires it when renaming a page.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde

Copy link
Copy Markdown
Collaborator Author

Superseded by #49 (rebuilt on the nextcloud#3100 model, see #13). Kept open for reference until Remko has ported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant