Skip to content

make direction optional in portProps schema#600

Draft
shehaban wants to merge 12 commits intotscircuit:mainfrom
shehaban:edit-direction
Draft

make direction optional in portProps schema#600
shehaban wants to merge 12 commits intotscircuit:mainfrom
shehaban:edit-direction

Conversation

@shehaban
Copy link
Contributor

@shehaban shehaban commented Feb 20, 2026

  • Updated the direction field in portProps to be optional instead of required.
  • This allows ports to be defined without explicitly specifying a direction

🎯 Why this change is needed

  • The direction field is already optional in the core portProps.
  • This change keeps the schema consistent while refactoring to use portProps from @tscircuit/props instead of declaring it inside core.
  • Prevents validation mismatches during the migration.

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why?

@shehaban
Copy link
Contributor Author

@seveibar I’m working on the core to use portProps from the props instead of defining it inside the core. It was previously defined as optional in corePortProps.

@seveibar
Copy link
Contributor

Why does it need to be optional? Why not make required

@shehaban
Copy link
Contributor Author

Because making it required will break existing tests, around 300 snapshot tests will fail
Keeping it optional avoids breaking current snapshots.

@MustafaMulla29
Copy link
Contributor

Because making it required will break existing tests, around 300 snapshot tests will fail Keeping it optional avoids breaking current snapshots.

Nothing will break it's a required property.

@shehaban
Copy link
Contributor Author

shehaban commented Feb 20, 2026

@seveibar @MustafaMulla29 It was optional in core, and I moved it as it was.

arrow-image (1)

@github-actions
Copy link

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions
Copy link

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@shehaban shehaban marked this pull request as draft February 28, 2026 20:30
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants