Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Refactor Snippet Editor permalink Logic #799

Open abotteram opened 5 years ago

abotteram commented 5 years ago

Please give us a description of what happened.

See Yoast/wordpress-seo#3514

This is the second step to fixing the above issue. Implement the API introduced in https://github.com/Yoast/yoast-components/issues/780 into the SnippetEditor. We will need to create a new branch to merge this into because it will change the current SnippetEditor API. Implementing this new API into wordpress-seo will be a new issue.

Specs: The snippet editor should take a urlStructure and a urlParts array, just like in the aforementioned API. When either of these props change, the new URL should be built and stored in state. So preferably not on every render call.

Technical info

Requires https://github.com/Yoast/yoast-components/issues/780