Skip to content

refactor(joint-react): rename callback arg types from ...Context to ...Params#3346

Closed
kumilingus wants to merge 1 commit into
clientIO:devfrom
kumilingus:refactor/joint-react-rename-context-params
Closed

refactor(joint-react): rename callback arg types from ...Context to ...Params#3346
kumilingus wants to merge 1 commit into
clientIO:devfrom
kumilingus:refactor/joint-react-rename-context-params

Conversation

@kumilingus
Copy link
Copy Markdown
Contributor

Summary

  • Renames callback argument types whose ...Context suffix collided with React's Context concept. These objects are plain parameter bags, so ...Params is the more accurate name.
  • Fixes a broken import in presets/index.ts that referenced ValidateConnectionParams before any such name existed.

Breaking changes (public API)

Old New
ValidateConnectionContext ValidateConnectionParams
ValidateEmbeddingContext ValidateEmbeddingParams
ValidateUnembeddingContext ValidateUnembeddingParams
CellVisibilityContext CellVisibilityParams
ConnectionStrategyContext ConnectionStrategyParams
InteractiveContext InteractiveParams
DefaultLinkContext DefaultLinkParams
PortalSelectorContext PortalSelectorParams

*EventContext types (PointerCellEventContext, etc.) are unchanged.

Test plan

  • yarn typecheck — no rename-related errors
  • yarn lint
  • yarn jest — 921 / 921 pass
  • yarn builddist/types contains the new ...Params names
  • Spot-check Storybook stories that use the renamed types render correctly

🤖 Generated with Claude Code

…..Params

Renames callback argument types whose names collide with React's Context concept.
These objects are plain parameter bags, not contexts.

Public API breaking change:
- ValidateConnectionContext   -> ValidateConnectionParams
- ValidateEmbeddingContext    -> ValidateEmbeddingParams
- ValidateUnembeddingContext  -> ValidateUnembeddingParams
- CellVisibilityContext       -> CellVisibilityParams
- ConnectionStrategyContext   -> ConnectionStrategyParams
- InteractiveContext          -> InteractiveParams
- DefaultLinkContext          -> DefaultLinkParams
- PortalSelectorContext       -> PortalSelectorParams

EventContext types (PointerCellEventContext, etc.) are unchanged.

Also fixes a broken import in presets/index.ts that referenced
ValidateConnectionParams before it existed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant