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

My Jetpack: handle redirect when no connection #22549

Merged
merged 17 commits into from
Jan 28, 2022

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Jan 28, 2022

Follow up of #22530

This PR adds changes about how the app handles the redirect when it doesn't have a site and a user connected.
Relevant points:

  • It adds an optional redirect option to the useMyJetpackConnection() hook. When it's true, the client will perform a redirect to the Jetpack dashboard in order to offer the user to connect to their site.
  • it checks at top of the app whether there aren't site and user connected. If so, it won't render anything and wait for the client redirect.
  • Because of the above, I've removed the redirecting handling from the <ConnectionsSection /> component.

Fixes #

Changes proposed in this Pull Request:

  • My Jetpack: handle redirect when no connection

Jetpack product discussion

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Check connecting and disconnecting the site.
  • Confirm when it's disconnected, the app performs a redirect to the Jetpack dashboard
  • In short, disconnect, connect, etc should work as expected

@retrofox retrofox added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Package] My Jetpack labels Jan 28, 2022
@retrofox retrofox requested a review from a team January 28, 2022 17:30
@retrofox retrofox self-assigned this Jan 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@retrofox retrofox force-pushed the update/my-jetpack-remove-connections-section branch 2 times, most recently from bee2f57 to 6f2dabc Compare January 28, 2022 18:04
leogermani
leogermani previously approved these changes Jan 28, 2022
Copy link
Contributor

@leogermani leogermani left a comment

Choose a reason for hiding this comment

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

Tests well in all situations

  • fully connected
  • connected at a site level
  • redirect after disconnect

@leogermani leogermani added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jan 28, 2022
@retrofox retrofox force-pushed the update/my-jetpack-remove-connections-section branch from 6f2dabc to 97c5799 Compare January 28, 2022 18:43
leogermani
leogermani previously approved these changes Jan 28, 2022
@retrofox retrofox merged commit cd75f36 into master Jan 28, 2022
@retrofox retrofox deleted the update/my-jetpack-remove-connections-section branch January 28, 2022 19:19
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 28, 2022
@oskosk oskosk added this to the My Jetpack MVP milestone Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants