Closed miina closed 7 years ago
@miina In a case of auto-draft
should we add that button to preview on front-end? Currently, It is not adding it.
I was trying to copy link but seems like you're generating it on click.
One more thing - Maybe it is not related to this PR, Currently edit post link is carrying customize_changeset_uuid
param. http://vvv.dev/wp-admin/post.php?post=1946&action=edit&customize_changeset_uuid=b526cc78-d93d-431a-b027-167452915f35
@PatelUtkarsh Thank you for testing. If you have time, could you test if you can still see these issues?
@miina After publish the button stays and on click it carries customize_changeset_uuid
however customize.php doesn't have any active/loaded changeset.
Edit: same behavior on initial load. button stays and carries customize_changeset_uuid
param on click of frontend preview link without any change.
@PatelUtkarsh Actually it's intended to have the button static, it's like a general static preview button as the others there. The changeset uuid that it has with it is the one that's going to be added to the URL when the first change happens, basically the active but not yet visible changeset uuid. Maybe that's confusing and should be removed.
@PatelUtkarsh Should be fixed, so if you have time again ... :)
@miina This looks fine except sometimes it takes time after clicking a preview button to open new tab.
It's probably taking time because it's waiting until the Customizer has finished it's changes before opening the link.
@westonruter If you have a moment could you take a quick look at this PR? To detect possible issues in code that I might have missed.
@miina here's a problem. I see that the preview link is getting inserted again with each time someone saves a draft and duplicates are getting inserted:
Thanks for bringing that out, should be fixed now.
There's a change of plans for where this link will appear. As can be seen in #39896 the link will now appear in a new panel that expands for extended publish settings:
So I'll be looking to incorporate your code into the core patch, specifically the JS logic. But the styling will probably not be included. And since it will be going into core directly, that will probably mean this PR will end up not getting merged.
Okay, thank you for the update.
@westonruter should we delete this PR/branch then and await the changes coming in #258 instead?
Yeah, we'll close the PR and will continue to refer to the code in it for the core patch in https://github.com/xwp/wordpress-develop/pull/258
Resolves #101