[Website] Show export text in the GitHub login prompt - #4048
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for describing why GitHub authentication is required (import vs export) by passing “intro” copy through the GitHub OAuth guard, and adds tests to validate default vs custom messaging.
Changes:
- Add an optional
introprop toGitHubOAuthGuardModal,GitHubOAuthGuard, andAuthenticateto customize the authentication explanation. - Update the export flow to pass export-specific intro copy into the guard.
- Add a Vitest spec to cover default (import) copy and custom (active flow) copy.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/playground/website/src/github/github-oauth-guard/index.tsx | Threads an optional intro ReactNode through the OAuth guard to customize auth messaging. |
| packages/playground/website/src/github/github-oauth-guard/index.spec.tsx | Adds tests verifying default intro copy and custom intro override. |
| packages/playground/website/src/github/github-export-form/form.tsx | Passes export-specific intro copy into GitHubOAuthGuard. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR shows export-specific copy when the export form asks the user to log in to GitHub.
The GitHub login prompt says it is importing plugins, themes, or
wp-content. It shows the same text when the export form asks the user to log in.Implementation
Add an optional
introprop toGitHubOAuthGuard. The export form now says what can be exported. Import callers omit the prop and keep the current import text. The login flow does not change.This is needed when the GitHub forms move into the Dock in #3965.
Testing
Verified with
npm exec nx test playground-website --output-style=staticandnpm exec nx typecheck playground-website --output-style=static.