-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Use react-frame-component for preview pane #404
Conversation
6334a5f
to
031187f
Compare
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.
Love the minimal changeset - awesome work. Just a few issues to resolve.
</ScrollSyncPane> | ||
, this.previewEl); | ||
} | ||
const styleEl = <link href={registry.getPreviewStyles()} type="text/css" rel="stylesheet" />; |
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.
registry.getPreviewStyles
returns an array - we should be mapping it.
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.
Good catch, thanks!
ref.contentDocument.head.appendChild(linkEl); | ||
}); | ||
|
||
const base = document.createElement('base'); |
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.
I believe we'll need this to avoid regression of #172.
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.
Resolved this by adding it to the initialContent
prop on Frame
.
@Benaiah update still coming for this? |
031187f
to
5090060
Compare
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.
Clear up that stray string and this is good to merge.
}; | ||
|
||
return (<Frame | ||
className={styles.frame}more** crazy stuff |
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.
lol more** crazy stuff?
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.
ugh, middle-click paste is not my friend sometimes 😛
This fixes the preview pane not working in Firefox
5090060
to
376fed2
Compare
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.
LGTM
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.
LGTM
Fixes #307
- Summary
Uses
react-frame-component
for preview pane instead of custom iframe code. Fixes #307.- Test plan
Existing tests pass; manually tested that previewing and scrolling work correctly in both Firefox and Chrome.
- Description for the changelog
Use react-frame-component for preview pane