Skip to content

Conversation

@d-winter
Copy link
Contributor

Summary

  • Removes dead code for locale/i18n support that was scaffolded but never implemented
  • Found undefined // locale not supported yet comment in Preview.ts confirming it was never functional
  • Locale was never documented in README or docs

Changes

Removed locale / data-hygraph-field-locale from:

  • Types (StudioMessage, SDKMessage, FieldUpdateBase, ElementAttributes, RegisteredElement, PreviewEvents)
  • Core modules (Preview.ts, FieldRegistry.ts, ContentUpdater.ts, OverlayManager.ts)
  • Attribute helpers (createPreviewAttributes, PreviewFieldOptions)
  • React components (HygraphPreview, HygraphPreviewNextjs)
  • Tests (removed locale-specific test, updated attribute test)

Test plan

  • npm run type-check passes
  • npm run test passes (24 tests)
  • npm run build succeeds

No breaking changes - locale was never documented or functional for users.

🤖 Generated with Claude Code

Locale/i18n support was scaffolded but never implemented - see
Preview.ts:398 which explicitly passed `undefined // locale not supported yet`.

Removed from:
- Types (StudioMessage, SDKMessage, FieldUpdateBase, ElementAttributes, etc.)
- Core modules (Preview, FieldRegistry, ContentUpdater, OverlayManager)
- Attribute helpers (createPreviewAttributes, PreviewFieldOptions)
- React components (HygraphPreview, HygraphPreviewNextjs)
- Tests (removed locale-specific test, updated attribute test)

No breaking changes - locale was never documented or functional.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@d-winter d-winter requested a review from a team as a code owner December 12, 2025 06:56
@d-winter d-winter merged commit 0844b5b into main Dec 12, 2025
2 checks passed
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