-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
core-*-api: backport support for external route ref default targets + config route binding #24777
base: master
Are you sure you want to change the base?
Conversation
…nd route binding through config Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
…ets and route binding through config Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
routeValidationError = error; | ||
throw error; | ||
} | ||
} else if (routeValidationError) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This structure kinda assumes that resolveRouteBindings
never throws. Could have the if (routeValidationError)
check at the very top instead, and then a try/catch around both resolveRouteBindings
and the validation. Or do you want this to potentially retry over and over if the resolutions failed the first time?
return undefined; | ||
}, | ||
// This might already be implemented in the legacy ref, but we override it just to be sure | ||
getDefaultTarget: newRef.getDefaultTarget, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDefaultTarget: newRef.getDefaultTarget, | |
getDefaultTarget: newRef.getDefaultTarget?.bind(newRef), |
or is that paranoid? :D
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Hey, I just made a Pull Request!
The new frontend system supports route binding through static configuration, for example:
It also lets you define default targets for external route references, for example:
This adds support for both of these features in the existing frontend system.
✔️ Checklist
Signed-off-by
line in the message. (more info)