-
Notifications
You must be signed in to change notification settings - Fork 172
feat: add iframe support for Apollo Client detection #1797
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
Open
gocamille
wants to merge
6
commits into
main
Choose a base branch
from
feat/iframe-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
de00458
feat: add iframe support for Apollo Client detection
gocamille 97d35a6
fix prettier issues
gocamille 37fc14a
feat(background): route client-specific RPC messages by frameId
gocamille 1374d7f
refactor(hook): remove SKIP_RESPONSE from targeted handlers
gocamille c817db0
test(rpc): add test coverage for SKIP_RESPONSE
gocamille 26712e0
fix formatting issues
gocamille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <title>Color App in an IFrame</title> | ||
| <style> | ||
| body { | ||
| margin: 0; | ||
| padding: 20px; | ||
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
| sans-serif; | ||
| background: #1a1a2e; | ||
| color: #eee; | ||
| } | ||
| h1 { | ||
| margin-top: 0; | ||
| color: #9d4edd; | ||
| } | ||
| p { | ||
| color: #aaa; | ||
| margin-bottom: 20px; | ||
| } | ||
| .iframe-container { | ||
| border: 2px solid #9d4edd; | ||
| border-radius: 8px; | ||
| overflow: hidden; | ||
| background: #fff; | ||
| } | ||
| iframe { | ||
| width: 100%; | ||
| height: 600px; | ||
| border: none; | ||
| display: block; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <h1>🔍 Iframe Apollo Client Test Page</h1> | ||
| <p> | ||
| This page embeds the Color App in an iframe. With | ||
| <code>all_frames: true</code> in the manifest, Apollo Client DevTools | ||
| should detect the Apollo Client instance running inside this iframe. | ||
| </p> | ||
| <div class="iframe-container"> | ||
| <iframe src="/" title="Color App in IFrame"></iframe> | ||
| </div> | ||
| </body> | ||
| </html> |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self to dive in a bit deeper tomorrow:
I wonder if there is a chance to use the
frameIdas part of this identifier instead of using aSet. The idea is that if we can beef up theida bit more, hopefully that would simplify some of the handling in other places where we don't have to try and ignore some messages due to it broadcasting to all frames on the same tab ID.