Skip to content

feat(api): list widget types and create views without a table on api/2 - #3077

Closed
remko48 wants to merge 5 commits into
feat/noid/grid-widget-typesfrom
feat/noid/views-api-v2-grid
Closed

remko48 wants to merge 5 commits into
feat/noid/grid-widget-typesfrom
feat/noid/views-api-v2-grid

Conversation

@remko48

@remko48 remko48 commented Oct 12, 2026

Copy link
Copy Markdown

Two api/2 endpoints so a client can build grid views: one to fetch the widget types with their schemas (the frontend renders its forms from them), and one to create a grid view, a view without a table.

What changes

  • GET /api/2/views/widget-types: returns every widget type with its title, default size and two schemas: configuration (how the widget sits on the page) and properties (what the widget shows, stored as its content).
  • POST /api/2/views: creates a grid view without a table. The type is always grid. It takes a title and optionally an emoji and a description; an invalid title or emoji returns a 400. It takes no technical name, since a view without a table is named by its id. The view belongs to whoever creates it and is returned in the usual view shape.
  • Create is rate limited (20 per minute per user). No RequirePermission is needed: there is no existing resource to check, and ownership is the creator's.
  • Only on api/2; api/1 is unchanged. OpenAPI and TS types regenerated.

🖼️ Screenshots

Backend only, no UI changes.

🏁 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

remko48 and others added 3 commits October 12, 2026 11:32
Two api/2 endpoints for grid views: one returns the widget types with the
schemas of their configuration and content, the other creates a view
without a table, owned by the user who creates it. Creating is rate
limited like the other mutation endpoints.

Co-authored-by: Ruben van der Linde <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <[email protected]>
- the title and emoji of a new grid view are validated like on update, so
  an empty or too long title or an invalid emoji is a 400 instead of a 200
  or a database error
- the endpoint drops the technicalName and type parameters: a view without
  a table is named by its id and is always a grid view
- widget property and widget types are typed as their known values
- both routes are declared with #[ApiRoute] on the controller; the spec
  moves them, which reorders openapi.json

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <[email protected]>
@remko48
remko48 requested review from blizzz and enjeck as code owners October 12, 2026 14:50
@remko48
remko48 added this pull request to stack #3080 October 12, 2026 14:56
Signed-off-by: Remko <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@rubenvdlinde

Copy link
Copy Markdown

Closing this in favour of the new stack that starts at #3131. After the review on #3075, @enjeck's design in #3099 and #3100 replaced the model these PRs were built on, so they can't be updated in place.

The backend of grid pages and application menus is now in #3131 to #3138. The frontend follows in separate PRs. @remko48 is co-author on the menu commits there. Thanks to everyone who reviewed these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants