Repository navigation
feat(pages): let widgets sit in the tabs of a tabs widget - #3212
Open
rubenvdlinde wants to merge 2 commits into
Open
rubenvdlinde wants to merge 2 commits into
rubenvdlinde wants to merge 2 commits into
Conversation
A tabs widget names its tabs one per line. A widget in one of its tabs stores the tabs widget in parent_id and the tab in parent_tab on tables_contexts_widget, and a page save names them as parentIndex and parentTab. The server checks that the parent is a tabs widget of the same page that sits on the page itself, so tabs go one level deep, that the tab exists, and the existing caps. An import keeps widgets in their tabs and skips a widget whose tabs widget or tab did not come along. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
This was referenced Nov 3, 2026
rubenvdlinde
marked this pull request as ready for review
November 6, 2026 08:24
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 #3211 (start page autofill). This is the model and the server side of a tabs widget: a widget whose tabs each hold widgets of their own. The UI comes in #3217.
@enjeck, this is the only pull request in the stack that changes the model of #3100:
tables_contexts_widgetgetsparent_idandparent_tab. Do you agree with that model for widgets in tabs? If you'd rather keep #3100 as it is, this pull request and #3217 can be dropped without affecting the others.Size: 333 lines: 229 code, 83 tests and 21 generated OpenAPI (in a separate commit).
What changes
GridWidgetTypes): itstabssetting names the tabs, one per line, at most 20.tables_contexts_widgetgetsparent_id(the tabs widget) andparent_tab(the position of the tab), both nullable, in their own migrationVersion2500Date20261030010000. The app version goes to2.5.0-dev.2, one dev step from feat(pages): fill the start page of an application with widgets #3211.parentIndex(the position of the tabs widget inwidgets) andparentTabfor a widget in a tab; page responses carryparentIdandparentTab. The server checks that the parent is a tabs widget of the same page that sits on the page itself, so tabs go one level deep and a tabs widget never sits in a tab, and that the tab exists. The cap of 100 widgets counts the widgets in tabs too.Until #3217, the frontend from #3214 on doesn't offer the tabs type, because it only offers types it can show.
How it was tested
On Nextcloud 34 with PostgreSQL:
PageServiceTest: a widget in a tab listed before its tabs widget is saved with its parent; 400 for a tab without tabs widget, a parent that isn't a tabs widget, aparentIndexthat isn't a number, tabs in tabs, an unknown tab and more than 20 tabs (one data provider)WidgetServiceTest(database): putting a widget in a tab and taking it out againContextPagesRoundTripTest(database): widgets in tabs survive a user data import, an orphan is skippedcomposer run rector:check,php -l,composer cs:checkand psalm, all clean🖼️ Screenshots
No UI change; #3217 has the screenshots.
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)