-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Themes: Add live preview to sheet #5482
Conversation
a3faf2e
to
8a1540b
Compare
@folletto: This could do with some expert attention to the styling :) |
@@ -28,6 +28,7 @@ export default ( state = Map(), action ) => { | |||
download: action.themeDownload, | |||
taxonomies: action.themeTaxonomies, | |||
stylesheet: action.themeStylesheet, | |||
demo_uri: action.themeDemoUri, |
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.
Should be demoUri: ...
, no?
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.
Existing code uses API format demo_uri
:
return `${theme.demo_uri}?demo=true&iframe=true&theme_preview=true`; |
I tried the entire Preview -> Try & Customize -> Activate flow and ended up with an
in |
Hmm, weird, can't repro on second try... |
Looking forward to this! |
@@ -1,3 +1,5 @@ | |||
/** @ssr-ready **/ | |||
|
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.
Kind of weird to mark this file as @ssr-ready
since it contains references to window
and document
. OTOH, they're wrapped in lifecycle methods, and this PR demonstrate that SSR works, so I guess it's fine :-)
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.
Kind of weird to mark this file as @ssr-ready since it contains references to window and document
Yeah, I can't say I'm totally happy with this situation. Seems like it could be fragile. Let's see how it goes...
For reference: the screenshot doesn't show the default. By default opens full screen, which is the expected behaviour. :) |
I see these from time to time. I don't think it is related to this PR. Next time I see it I'll track it in a separate issue. I thought it might be related to activating an already activated theme, but that doesn't give me the error. |
@folletto: Nice work on the styling 👍 |
Okay, LGTM! |
049df2b
to
a3a423a
Compare
@@ -1,3 +1,5 @@ | |||
/** @ssr-ready **/ |
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.
The changes here don't necessarily make it SSR-ready, does it? The condition below will still throw ReferenceError
on the window
reference. I think you want 'undefined' !== typeof window
instead?
Addresses #3162
To Test
Expected