Skip to content

Comments

make direction optional in portProps schema#600

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

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

It was optional in core, and I moved it as it was

arrow-image (1)

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.

3 participants