Skip to content

feat(pages): add and configure widgets from their server schema - #3214

Open
rubenvdlinde wants to merge 1 commit into
feat/noid/grid-canvasfrom
feat/noid/grid-widget-editor
Open

rubenvdlinde wants to merge 1 commit into
feat/noid/grid-canvasfrom
feat/noid/grid-widget-editor

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 3, 2026 •

Copy link
Copy Markdown

Part of #3099, on top of #3213 (grid canvas). The dialog that adds a widget to a grid or configures one, with a settings form generated from the widget types the server serves. #3215 opens it from the edit mode of a page.

Size: 587 lines: 488 code and 99 tests.

What changes

  • The widget dialog asks for the type, a title, an icon from the named icon set, a description, and for a table or view widget one of the application's own tables and views.
  • The settings form is generated from the schema of the type on GET /api/2/widget-types: text, long text, choices, a switch and colours. A new widget type needs a schema on the server and a renderer here, no new dialog. Required settings keep Add widget disabled until they're filled.
  • Only types this frontend can show are offered. The server can know a type before the frontend renders it (the tabs type of feat(pages): let widgets sit in the tabs of a tabs widget #3212 until feat(pages): add a tabs widget whose tabs hold their own widgets #3217), and such a type is left out of the list.
  • Configuring a widget keeps its icon, description and settings, and the type can't be changed.
  • IconField picks a named icon for a form, with a button to clear it; feat(pages): show and edit grid pages of an application #3215 uses it for pages too.

How it was tested

  • Cypress component tests: AddWidget.cy.js (only types it can show, the form from the server's schema with a required setting, icon and description kept when configuring, a data widget needs a table or view; the test of the offered types fails without the filter) and gridLayout.cy.js (the tables and views of the application)
  • npm run lint, npm run stylelint and npm run build
  • no PHP changes

🖼️ Screenshots

No screen yet: #3215 opens the dialog from a page, its pull request has the screenshots.

🏁 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

The dialog that adds or configures a widget asks for its type, title,
named icon and description. Its settings form is generated from the
widget types the server serves, so a new type needs a schema on the
server and a renderer here, no new dialog. A data widget picks a table
or view of its application. Only types this frontend can show are
offered.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
@rubenvdlinde
rubenvdlinde force-pushed the feat/noid/grid-widget-editor branch from 8c04319 to fbd83b2 Compare November 5, 2026 11:59
@rubenvdlinde
rubenvdlinde marked this pull request as ready for review November 6, 2026 08:24
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