Skip to content

feat: improve field config screen#9

Merged
slimluccii merged 1 commit into
mainfrom
feat/improve-field-config-screen
Apr 8, 2026
Merged

feat: improve field config screen#9
slimluccii merged 1 commit into
mainfrom
feat/improve-field-config-screen

Conversation

@slimluccii

@slimluccii slimluccii commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Move min/max fields to a separate "Validation" section with type="number" inputs
  • Add descriptive hints to all config and mapping fields
  • Switch additionalHeaders to a TextareaField for easier JSON editing
  • Add missing useCORSProxy to useEffect dependency array
  • Debounce setParameters calls (300ms) to reduce unnecessary updates
  • Derive preview with useMemo instead of useState + side-effect
  • Build parameters object explicitly instead of spreading stale closure

Test

  1. Clone repository
  2. Run npm ci
  3. Run npm run dev
  4. Go to DatoCMS -> dato-plugin-tryout -> Schema -> Plugin Foreign Data Selector
  5. Edit field. Either fields are fine
  6. Go to presentation
  7. Validate if config screen is clear.

- Move min/max fields under a separate "Validation" section
- Add descriptive hints to all mapping and config fields
- Change additionalHeaders to a TextareaField for easier JSON editing
- Add CORS proxy hint explaining when to enable it

- Derive preview with useMemo instead of useState + side-effect
- Debounce setParameters calls (300ms) to reduce unnecessary updates
- Add missing useCORSProxy to useEffect dependency array
- Build parameters object explicitly instead of spreading stale closure
- Add type="number" to min/max inputs
@slimluccii slimluccii self-assigned this Apr 7, 2026
@slimluccii slimluccii marked this pull request as ready for review April 7, 2026 10:20
@slimluccii slimluccii merged commit a2d1b94 into main Apr 8, 2026
1 check passed
@slimluccii slimluccii deleted the feat/improve-field-config-screen branch April 8, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants