Closed
Conversation
Copilot
AI
changed the title
[WIP] Add fields support to dashboard widgets
feat(next, ui): widget fields
Feb 23, 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.
Adds configurable
fieldssupport to dashboard widgets — widgets can now declare a field schema (analogous to Blocks), with data editable via a drawer UI when in dashboard editing mode.Changes
Widgettype gains an optionalfields: Field[]array;sanitizeConfigsanitizes widget fields the same way collection/global fields are sanitizedconfigToJSONSchemaemits per-widget data schemas derived fromfields;widthtype is narrowed to the allowed range based onminWidth/maxWidthconstraintsTypedWidget,WidgetSlug,DataFromWidgetSlugtypes added topackages/payload/src/index.ts;WidgetInstance<TSlug>is now generic with typeddataand constrainedwidthWidgetServerProps<T>— generic parameter narrows bothwidgetDataandwidgetSlugfor a given widget typeWidgetConfigDrawerrenders aFormover the widget's fields; edit control hidden when widget has no fields; drawer saves data back into layout statebuildFieldSchemaMap— widget fields included so Lexical/RSC field resolvers work inside widget field editorsdocs/custom-components/dashboard.mdxupdated with field usage exampleExample
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.