Add url and email plugin setting field types (Issue #175)#189
Add url and email plugin setting field types (Issue #175)#189Sayeem3051 wants to merge 17 commits intoemdash-cms:mainfrom
Conversation
Add UrlSettingField and EmailSettingField interfaces to the plugin settings schema. - Updated SettingFieldType union to include "url" and "email" - Added UrlSettingField and EmailSettingField interfaces - Updated SettingField union type Fixes emdash-cms#175
Add Zod schemas for url and email field types to the plugin setting field discriminated union in manifest-schema.ts, to resolve issue emdash-cms#175.
|
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
- Added missing closing brace after SecretSettingField's type property - Removed semicolon from SecretSettingField in the SettingField union type - This fixes the TypeScript TS(1070) error: 'export' modifier cannot appear on a type member - Fixes the CI Format check failure on PR emdash-cms#189
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
Adds new plugin setting field types (url, email) to the core plugin settings type system and manifest validation, enabling richer admin UI generation and schema support for plugins (Issue #175).
Changes:
- Extended
SettingFieldType/SettingFieldto includeurlandemailfield variants. - Added
UrlSettingFieldandEmailSettingFieldinterfaces (withdefault/placeholder). - Updated the plugin manifest Zod discriminated union to recognize
urlandemailsetting fields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/core/src/plugins/types.ts | Adds new setting field types/interfaces; updates the SettingField union. |
| packages/core/src/plugins/manifest-schema.ts | Extends manifest validation to accept url and email in admin.settingsSchema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | BooleanSettingField | ||
| | SelectSettingField | ||
| | SecretSettingField; | ||
| | SecretSettingFiel |
| z.object({ ...baseSettingFields, type: z.literal("url") }), | ||
| z.object({ ...baseSettingFields, type: z.literal("email") }), |
| z.object({ ...baseSettingFields, type: z.literal("url") }), | ||
| z.object({ ...baseSettingFields, type: z.literal("email") }), |
Added optional default and placeholder fields to url and email types in manifest schema.
Added tests for url and email field types in admin.settingsSchema.
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
This PR adds support for
urlandemailplugin setting field types to resolve issue #175.urlandemailto theSettingFieldTypeunion intypes.tsUrlSettingFieldandEmailSettingFieldinterfaces with optionaldefaultandplaceholderfieldsmanifest-schema.tsdiscriminated unionCloses #175
Type of change
Checklist
pnpm typecheckpassespnpm --silent lint:json | jq '.diagnostics | length'returns 0pnpm testpasses (or targeted tests for my change)pnpm formathas been runAI-generated code disclosure
Screenshots / test output