Skip to content

feat(pages): grid pages in the application UI (#3099, step 4) - #49

Open
rubenvdlinde wants to merge 1 commit into
stack/r3-grid-widgetsfrom
stack/r4-grid-pages
Open

rubenvdlinde wants to merge 1 commit into
stack/r3-grid-widgetsfrom
stack/r4-grid-pages

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Collaborator

Step 4 of the page rework on nextcloud#3099 / nextcloud#3100 (follows the review on nextcloud#3075). Stacked on #48.

What

  • Page bar under the application description: "Start page", one tab per grid page (emoji and title), "Add page" for people who manage the application.
  • Route /application/:contextId/page/:pageId showing the grid page: emoji, title and description, then the grid.
  • "Add page" / "Edit page details" dialog asks for title, emoji and description (Grid pages in applications (frontend)聽nextcloud/tables#3099 screenshot 6).
  • "Edit page" turns the widgets into cards to drag, resize (also by keyboard from the card menu), configure and remove; "Add widget" opens the widget dialog. "Save" PATCHes the whole layout once, "Cancel" drops every change, leaving with unsaved changes asks first. "Delete page" asks for confirmation and goes back to the start page.
  • People who cannot manage the application see the pages with live data, without "Add page", "Edit page" or the page menu.
  • The start page renders exactly as before; its tables are loaded only while it is shown.

nextcloud#3099 points covered

Page bar, grid page, edit mode with Save/Cancel, widget types dialog, own-tables-only data widget, add page dialog, read-only sharee, "Only people who manage the application can add, edit or delete pages", "If a table or view leaves the application, its widget stays on the page and asks the editor to pick another one".

Tests (Nextcloud 34 on :8194, viewport 1600 px, --timeout=120000)

  • npx playwright test playwright/e2e/context-grid-pages.spec.ts: 5 passed (58.2s): start page unchanged with the page bar; create a page, add a header and a data widget for an application table (the table outside the application is not offered), save, reload; Cancel sends no PATCH; read-only sharee sees live data, no edit controls, PATCH answers 403; a table removed from the application leaves the widget with "No table or view to show" and, in edit mode, "Pick a table or view".
  • Existing context.spec.ts + context-navigation.spec.ts: 8 passed (5.0m).
  • Cypress component tests from step 3: All specs passed! 14 14.
  • npm run lint: 0 errors, 1 inherited warning (src/store/store.js:176); npm run stylelint: clean.

Known limit: the UI shows the edit controls to the owner of the application (same rule as "Edit application" in the navigation). A sharee with manage permission can use the API but does not see the controls, because the context response does not carry the viewer's share permissions.

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

Adds the page bar under the application description (start page, one tab
per grid page, "Add page" for managers), a route per grid page, the add
and edit page dialog (title, emoji, description) and the grid page with
an edit mode: drag, resize, configure and remove widgets, Save stores the
whole layout, Cancel drops it. People who cannot manage the application
see the pages read-only with live data. The start page is unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
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