Repository navigation
feat(grid): grid canvas and widget components (#3100/#3099, step 3) - #48
Open
rubenvdlinde wants to merge 1 commit into
Open
rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
Carries the grid frontend over from the earlier stack onto the widget shape of the nextcloud#3100 API: a settings map per widget and a source node relation for data widgets. The canvas places widgets on 12 columns and reflows to 6 and 1 on narrow screens; the add widget dialog renders the settings form from the type schema and offers only the application's own tables and views. A data widget without a source asks the editor to pick one and shows an empty state to viewers. Assisted-by: ClaudeCode:claude-opus-5-5
This was referenced Oct 16, 2026
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.
Step 3 of the page rework on nextcloud#3100 / nextcloud#3099 (follows the review on nextcloud#3075). Stacked on #47. Components only; the page that uses them follows in step 4.
What
src/modules/grid/:GridCanvas(GridStack, 12 columns, reflows to 6 and then 1 column on narrow canvases via a ResizeObserver; only the 12 column layout is ever emitted),GridWidget(card with title, edit menu with configure, remove and keyboard move/resize steps),SchemaForm(settings form from the type schema),widgetRegistry(each type registers its component in one place), widgetsHeaderWidget,TextWidget,DataWidget.gridLayout.js: converts between the API page (widgets[]withsettingsandsource.nodeRelId) and the editable grid, and back to the PATCH payload (saved widgets keep theirid;sourceonly for types withhasSource).AddWidgetdialog: type, optional title, settings form; a data widget offers only the application's own tables and views (Grid pages in applications (frontend)聽nextcloud/tables#3099 screenshot 5).showTitleflag of the earlier stack is gone.loadWidgetTypes()(one shared request). Dependency:gridstack@^13.3.0(MIT, checked on the npm registry; lockfile adds only that package).nextcloud#3099 points covered
"The grid has 12 columns and changes to 6 and then 1 column on narrow screens", "A widget shows its title when it has one", "If a table or view leaves the application, its widget stays on the page and asks the editor to pick another one", "Each widget type registers its component in one place", the data widget's own-tables-only picker.
Tests
env -u ELECTRON_RUN_AS_NODE npx cypress run --component --spec cypress/component/gridLayout.cy.js,cypress/component/GridWidget.cy.js:All specs passed! 14 14(layout conversion, own-node options, save payload, reflow breakpoints, title, pick/empty states)npm run lint: 0 errors, 1 inherited warning (src/store/store.js:176, jsdoc on an existing action);npm run stylelint: clean;npm run build: built.Size: 1,556 changed lines excluding the lockfile, just over the 1,500 guideline; splitting the canvas from the widgets would leave either half untestable on its own, so it stays one PR.
Prepared in the Conduction fork for porting upstream by @remko48. Prepared with Claude Code.