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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃獰馃И馃悰 Fix redirection in signup source selector experiment #19382

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

letiescanciano
Copy link
Contributor

Demo: https://www.loom.com/share/fabca04e7b024e16b0f714b22bef3f52

What

Fixed a bug introduced in signup source selector experiment where the user was being redirected every time to /connections/new-connection

Comment on lines +31 to +35
{...(isSignupSourceSelectorExperiment &&
sourceDefinitionId && {
state: { sourceDefinitionId },
to: `/${RoutePaths.Workspaces}/${workspaces[0].workspaceId}/${RoutePaths.Connections}/${RoutePaths.ConnectionNew}`,
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this could be cleaned up to make it easier to follow the logic? A better way might be to set up the props before the render. For example:

let navigateProps: NavigateProps = { replace: true }
if (somecondition) {
  navigateProps = {
     ...navigateProps,
     state: { sourceDefintionId },
     to: `...`
  }
} else {
   navigateProps.to = `...`
}

return <Navigate {...navigateProps} />

Copy link
Collaborator

Choose a reason for hiding this comment

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

The reason we keep it separate is that the experiments are meant to be removed completely potentially when they are not successful, so the code is tried to be highlighted separately. Leti, treat this as a 馃Ч that needs to be cleaned up if we keep this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course!

Copy link
Collaborator

@timroes timroes left a comment

Choose a reason for hiding this comment

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

Code LGTM. Have seen it in action via zoom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform team/growth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants