Fix: “Copy” button misaligned in Share Preview Link section in Customizer#11003
Fix: “Copy” button misaligned in Share Preview Link section in Customizer#11003hbhalodia wants to merge 5 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
We should avoid Using the absolute positioning approach with: .preview-link-wrapper .customize-copy-preview-link.preview-control-element.button {
margin: auto 0;
position: absolute;
top: 0;
bottom: 0;
right: 0;
}is much cleaner. It vertically centers the button without relying on |
Hi @huzaifaalmesbah, Thanks for the review. I am indeed inclined towards to not use
Even if we remove the transform property from the element, the button disabled will add the transform property anyways. So IMO, currently overriding the button disabled behavior for this customization could be acceptable. Although, I will wait for others to review as well. Thanks 🙇 |
|
There are a couple additional changes needed here; I'm just going to push them to this PR, rather than try to describe them. They both relate to after saving changes; once the link is expanded, it becomes longer than the containing region & goes under the button. To accommodate, the button can't have a transparent background & the generated content needs to be increased in height to match the button. |
Thanks @joedolson, For the review and update. I see the changes you added and looks good. I see the same issue when button is disabled for longer links, we should update the background color to
I am updating the PR with changes for now, will revert if we go with any other approach. After
Thanks, |



Trac ticket: https://core.trac.wordpress.org/ticket/64688
Use of AI Tools
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.