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

feat: APP-360 redirect to project buy after google login #2494

Merged
merged 7 commits into from
Oct 23, 2024

Conversation

r41ph
Copy link
Contributor

@r41ph r41ph commented Oct 3, 2024

Description

https://regennetwork.atlassian.net/browse/APP-360


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • provided a link to the relevant issue or specification
  • provided instructions on how to test
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

How to test

  1. Go to https://deploy-preview-2494--regen-marketplace.netlify.app/project/C01-001/buy and click Next button in the choose credits form.
  2. In the next page login with Google and verify that after successful log in you are redirected to the same step in the buying flow.

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items
.

I have...

  • confirmed all author checklist items have been addressed
  • reviewed code correctness and readability
  • verified React components follow DRY principles
  • reviewed documentation is accurate
  • reviewed tests
  • manually tested (if applicable)

Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for regen-website ready!

Name Link
🔨 Latest commit caa9533
🔍 Latest deploy log https://app.netlify.com/sites/regen-website/deploys/6718ce7b0c37230008e08fb0
😎 Deploy Preview https://deploy-preview-2494--regen-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@r41ph r41ph requested a review from blushi October 3, 2024 13:45
Comment on lines 6 to 7
createProject: boolean = false,
buyCreditsFrom?: string,
Copy link
Member

@blushi blushi Oct 7, 2024

Choose a reason for hiding this comment

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

since we're adding more custom redirect routes, maybe we should just refactor this to take an optional redirectRoute as param?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me, passing redirectRoute as a param definitely makes sense!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment now should be:

<LoginFlow
  isModalOpen={isModalOpen}
  onModalClose={onModalClose}
  wallets={walletsUiConfig}
  modalState={modalState}
  # New prop:
  redirectRoute={`${projectHref}/buy`}
/>

@r41ph r41ph force-pushed the feat-APP-360-redirect-after-google-login branch from deb922c to 0cac65c Compare October 7, 2024 09:53
@r41ph r41ph requested a review from blushi October 7, 2024 10:20
@blushi
Copy link
Member

blushi commented Oct 9, 2024

Maybe let's wait on #2477 to be merged before merging this

@blushi
Copy link
Member

blushi commented Oct 17, 2024

@r41ph could you update your branch to latest dev and implement the remaining TODOs now that the main buy credits PR is merged?

@r41ph r41ph force-pushed the feat-APP-360-redirect-after-google-login branch from 0cac65c to fb391eb Compare October 17, 2024 08:43
@r41ph
Copy link
Contributor Author

r41ph commented Oct 17, 2024

@r41ph could you update your branch to latest dev and implement the remaining TODOs now that the main buy credits PR is merged?

@blushi Done

@blushi
Copy link
Member

blushi commented Oct 17, 2024

@r41ph could you update the testing instructions so @erikalogie can test this please?

Copy link
Member

@blushi blushi left a comment

Choose a reason for hiding this comment

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

getting this when clicking on google button

image

createProject ? '?route=project-pages/draft/basic-info' : ''
}`;
window.location.href = `${apiUri}/marketplace/v1/auth/google
${redirectRoute ? `?route=${redirectRoute}` : ''}`;
Copy link
Member

Choose a reason for hiding this comment

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

the issue above is because you have some spaces in the string

@r41ph r41ph requested a review from blushi October 17, 2024 16:16
@r41ph
Copy link
Contributor Author

r41ph commented Oct 21, 2024

@erikalogie please see testing instructions

@r41ph r41ph force-pushed the feat-APP-360-redirect-after-google-login branch from b936a25 to 258a188 Compare October 21, 2024 13:10
@erikalogie
Copy link
Collaborator

This looks to me like it is working

@S4mmyb
Copy link
Member

S4mmyb commented Oct 22, 2024

I got redirected to the profile page

Copy link
Member

@blushi blushi left a comment

Choose a reason for hiding this comment

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

could you drop react-error-overlay in here as well so netlify previews work?

@r41ph r41ph force-pushed the feat-APP-360-redirect-after-google-login branch 2 times, most recently from 0f6819f to 1b930a9 Compare October 22, 2024 09:15
@r41ph r41ph requested a review from blushi October 22, 2024 09:22
Copy link
Member

@blushi blushi left a comment

Choose a reason for hiding this comment

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

LGTM

Just a side note that this will redirect to the dev app (hence losing progress info), because the redirect app url is set up on the server side and we use the same staging server for deploy previews and the dev app.
I could set it up temporarily to redirect to this deploy preview but I don't think it's super necessary, let me know

@r41ph r41ph force-pushed the feat-APP-360-redirect-after-google-login branch from 1b930a9 to caa9533 Compare October 23, 2024 10:22
@r41ph r41ph merged commit 183d001 into dev Oct 23, 2024
14 checks passed
@r41ph r41ph deleted the feat-APP-360-redirect-after-google-login branch October 23, 2024 10:27
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.

4 participants