Skip to content

[Website] Show export text in the GitHub login prompt - #4048

Merged
adamziel merged 2 commits into
trunkfrom
github-oauth-context-copy
Jul 14, 2026
Merged

[Website] Show export text in the GitHub login prompt#4048
adamziel merged 2 commits into
trunkfrom
github-oauth-context-copy

Conversation

@adamziel

@adamziel adamziel commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

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 intro prop to GitHubOAuthGuard. 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=static and npm exec nx typecheck playground-website --output-style=static.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 intro prop to GitHubOAuthGuardModal, GitHubOAuthGuard, and Authenticate to 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.

Comment thread packages/playground/website/src/github/github-oauth-guard/index.spec.tsx Outdated
Comment thread packages/playground/website/src/github/github-oauth-guard/index.spec.tsx Outdated
@adamziel adamziel changed the title [Website] Describe GitHub authentication in the active flow Jul 14, 2026
@adamziel
adamziel merged commit d7d614a into trunk Jul 14, 2026
53 checks passed
@adamziel
adamziel deleted the github-oauth-context-copy branch July 14, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment