Adds 'nofollow' setting to Button block#54110
Merged
getdave merged 9 commits intoWordPress:trunkfrom Sep 21, 2023
Merged
Conversation
bangank36
commented
Sep 1, 2023
f22ca0c to
3137c93
Compare
Contributor
|
This is looking good, just needs a rebase I think. |
getdave
previously requested changes
Sep 7, 2023
getdave
reviewed
Sep 7, 2023
getdave
reviewed
Sep 7, 2023
getdave
reviewed
Sep 7, 2023
8ae1504 to
08d44c6
Compare
getdave
reviewed
Sep 8, 2023
getdave
reviewed
Sep 8, 2023
getdave
reviewed
Sep 8, 2023
getdave
reviewed
Sep 13, 2023
getdave
reviewed
Sep 13, 2023
getdave
reviewed
Sep 13, 2023
2626796 to
dbe9b5f
Compare
Contributor
Author
|
Hi @getdave, just a friendly nudge to request your review of the latest changes on my PR when you have a moment. Thanks! |
getdave
reviewed
Sep 20, 2023
getdave
reviewed
Sep 20, 2023
Contributor
getdave
left a comment
There was a problem hiding this comment.
This is very close. Thank you for your patience.
I think upon reflection some unit tests would help add confidence here. They will also lay a solid foundation for a later refactoring.
Use constant instead of string Update e2e test for Button nofollow link setting Improve settings toggle logic - Update nofollow control label Update link control label
6df0f71 to
7895ebd
Compare
getdave
reviewed
Sep 21, 2023
Contributor
getdave
left a comment
There was a problem hiding this comment.
Great work here. A few more tweaks and we should be in a good place.
getdave
reviewed
Sep 21, 2023
getdave
approved these changes
Sep 21, 2023
Contributor
getdave
left a comment
There was a problem hiding this comment.
Thank you for all the work on this.
LGTM 🚀
Contributor
|
Note to WP 6.4 leads. I don't believe we need to backport this PR. Happy to be advised otherwise if folks find it to be sufficiently "blessed". |
This was referenced Sep 25, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Add the ability to toggle the
nofollowfor Button's link.Partial implementation of #54091
Prior art for Rich text link #53945
Why?
Check #53945 (comment)
How?
nofollowoption in theAdvancedsettings areaTesting Instructions
opensInNewTabandnofollowrelandtargetattributes has been inserted correctlytarget="_blank" rel="noreferrer noopener"target="" rel="nofollow"target="_blank" rel="noreferrer noopener nofollow"target="" rel=""Testings
Verify and update these e2e tests
npm run test:e2e:playwright -- test/e2e/specs/editor/blocks/links.spec.jsnpm run test:e2e:playwright -- test/e2e/specs/editor/blocks/buttons.spec.jsInsert new unit testing for updateLinkAttributes
npm run test:unit -- packages/block-library/src/buttonTesting Instructions for Keyboard
Screenshots or screencast
Kapture.2023-09-01.at.19.39.59.mp4
cc: @getdave