Enhance flow handling by integrating forwards dynamically#587
Open
stijnpotters1 wants to merge 4 commits into
Open
Enhance flow handling by integrating forwards dynamically#587stijnpotters1 wants to merge 4 commits into
stijnpotters1 wants to merge 4 commits into
Conversation
…g source handle extraction
|
Matthbo
requested changes
Jul 2, 2026
| function colourFromName(type: string): string { | ||
| let hash = 0 | ||
| for (const character of type) { | ||
| hash = (hash * 31 + (character.codePointAt(0) ?? 0)) % (360 - GREEN_BAND_SIZE) |
Member
There was a problem hiding this comment.
So why a base value of 31?
I remember seeing this done before and I questioned it back then too, making it a const and having a descriptive name would help a lot
Comment on lines
+19
to
+21
| if (element?.labels?.EIP === 'Router') return forwards | ||
|
|
||
| return { success: {}, ...forwards } |
Member
There was a problem hiding this comment.
Why add the success forward for all other elements?
If inheritance is handled correctly then every element that inherits from FixedForwardPipe should have the sucess forward which is defined on there
| return { success: {}, ...forwards } | ||
| } | ||
|
|
||
| export function getDefaultSourceHandles(resolvedForwards: Record<string, ElementProperty> | undefined): SourceHandle[] { |
Member
There was a problem hiding this comment.
Suggested change
| export function getDefaultSourceHandles(resolvedForwards: Record<string, ElementProperty> | undefined): SourceHandle[] { | |
| export function getDefaultSourceHandles(resolvedForwards?: Record<string, ElementProperty>): SourceHandle[] { |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Now i have made logic to make different colors for each handle type.


The thing is that we could reuse the colour logic of #536 here as well. But this needs to be merged first