Repository navigation
feat(contexts): keep widgets in step with pages and applications - #3132
Open
rubenvdlinde wants to merge 1 commit into
Open
rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
This was referenced Oct 22, 2026
rubenvdlinde
force-pushed
the
feat/noid/grid-widget-lifecycle
branch
from
October 22, 2026 11:37
9c0151e to
bcce8b6
Compare
rubenvdlinde
force-pushed
the
feat/noid/grid-widget-lifecycle
branch
from
October 22, 2026 13:25
bcce8b6 to
390968d
Compare
rubenvdlinde
force-pushed
the
feat/noid/grid-widget-lifecycle
branch
2 times, most recently
from
October 24, 2026 08:09
3dedb5e to
669999e
Compare
Saving a page syncs its widgets by id in one transaction. Deleting a page or an application deletes its widgets and their sources, and removing a table or view from an application deletes only the sources that point at it, so the widget stays. Moving a user's data carries pages, widgets and sources, remapped to the imported nodes and checked like a save. The header, text and data widget types are defined in one place with the schema their settings are checked against. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
rubenvdlinde
force-pushed
the
feat/noid/grid-widget-lifecycle
branch
from
October 26, 2026 09:24
669999e to
af7e75b
Compare
rubenvdlinde
marked this pull request as ready for review
October 26, 2026 09:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3099, on top of #3131 (data model). This adds the behaviour #3100 describes for widgets, still without an API or UI.
Size: 1717 lines: 627 code, 1090 tests.
TablesMigrator) carries an application's pages, widgets and settings. A widget source only comes along when it points at the table being imported:importContext()maps every node to that table, so a source for another table would land on the wrong one. Imported widgets and page texts are checked the same way as saved ones, and invalid ones are skipped with a warning in the log.#rgbor#rrggbb.Data exported with widgets can't be imported into an older version of Tables. That belongs in the changelog.
Three smaller changes come with it:
The widget types aren't in
ResponseDefinitionsyet, because the OpenAPI generator refuses schemas that no endpoint uses. They move there together with the endpoints in the next pull request.Why nothing breaks
There is still no way to create a widget, so all of this runs on empty tables. Deleting an application or removing a table behaves as before; it now also checks two more tables.
How it was tested
On Nextcloud 34 with PostgreSQL:
WidgetServiceTest(database, including clearing a widget title back to empty, and refusing a widget id from another page)GridWidgetTypesTestandContextServiceTestContextPagesRoundTripTest(database: export, import, removing a table, deleting an application)ContextMapperTestandTablesMigratorTestcomposer cs:check, psalm and rector, all clean🖼️ Screenshots
Backend only, no UI changes.
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)