Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add children property to Edges/Port components #76

Merged
merged 11 commits into from
Mar 4, 2021

Conversation

Vadorequest
Copy link
Contributor

@Vadorequest Vadorequest commented Feb 26, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Using children isn't currently possible for Edge/Port components.

Issue Number:

What is the new behavior?

Using children is now possible for Edge/Port components.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

New capabilities:

  • Using children to display custom React components at the center of an edge.
  • Using children to display custom React components close to a port.

Used by Vadorequest/rwa-faunadb-reaflow-nextjs-magic#4 to display the following:

image


Depends on #69 for adding component tests.
Fixes #67

Copy link
Contributor Author

@Vadorequest Vadorequest left a comment

Choose a reason for hiding this comment

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

@amcdnl I've started working on this, I hope you see how useful children can be. It's not mergeable yet (haven't done Port) but it's a good start and I'll implement the Port similarly.

@Vadorequest
Copy link
Contributor Author

Here's what now possible using children in Port component:

image

Copy link
Member

@amcdnl amcdnl left a comment

Choose a reason for hiding this comment

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

Good overall - just a few nits

@Vadorequest
Copy link
Contributor Author

@amcdnl LGTM. How do you want to proceed regarding testing? I'm not sure tests are necessary. if it is, I'd like #69 to be merged first because that's where I've configured Jest/TS config for components testing.

Otherwise, it can be merged as it. Your call :)

@Vadorequest Vadorequest marked this pull request as ready for review March 4, 2021 13:58
@amcdnl amcdnl merged commit 5cc1e4c into reaviz:master Mar 4, 2021
@Vadorequest Vadorequest deleted the children-edge-port branch March 4, 2021 14:20
@Vadorequest
Copy link
Contributor Author

@amcdnl Could you release a new version please? I'd like to use this. 😄

@amcdnl
Copy link
Member

amcdnl commented Mar 7, 2021

Oh crap - I forgot! doing now!

@AstralBaby
Copy link

is there any documentation on how to use this?

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.

Edges/Ports should support children property (similar to Nodes)
3 participants