Refactor link creation UI to standalone component/file#46031
Merged
scruffian merged 11 commits intoNov 24, 2022
Conversation
This will make this easier to refactor in future
|
|
|
Size Change: +83 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
scruffian
reviewed
Nov 24, 2022
| @@ -0,0 +1,202 @@ | |||
| /** | |||
Contributor
There was a problem hiding this comment.
Is it worth moving this out of navigation-link?
Contributor
Author
There was a problem hiding this comment.
What is this? Sorry the comment is on the first line of a JS comment block.
Contributor
There was a problem hiding this comment.
Sorry, I mean the whole file.
scruffian
approved these changes
Nov 24, 2022
scruffian
left a comment
Contributor
There was a problem hiding this comment.
Everything seems to work exactly the same. Code looks good too.
Member
|
#46161 addresses a minor ESLint warning that we introduced with this PR. |
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?
Refactors all the link creation components and utilities in
core/navigaiton-linkto a single component/file.Why?
This is a step towards goals set out in #45996 (comment).
The idea is that we'll need to display the same link ui interface within the Nav block offcanvas experiment as is currently used within the block in the editor canvas.
By extracting everything to a single file it will be easier to see what we have copied/pasted (reused) within the offcanvas.
This also has the additional benefit of cleaning up the code of the Nav Link block.
How?
Extracts all the Link UI specific stuff to a separate standalone file which can be fed props to configure it for a specific block and link instance.
This should mean we can feed it block data from the offcanvas experiment and it will "just work".
Testing Instructions
The goal here is to check the link creation UI within the Nav block has not be effected at all. It should remain exactly as it is on
trunk. Whatever bugs you find here please be sure to cross check them withtrunk.Screenshots or screencast