From a48c6eca26f0da00e16cb9f4647b3b7902621531 Mon Sep 17 00:00:00 2001 From: Aki Hamano Date: Wed, 31 Jul 2024 11:16:25 +0900 Subject: [PATCH] Editor: Enhance post URL UI --- .../editor/src/components/post-url/index.js | 158 ++++++++---------- .../editor/src/components/post-url/panel.js | 2 +- .../editor/src/components/post-url/style.scss | 8 - 3 files changed, 74 insertions(+), 94 deletions(-) diff --git a/packages/editor/src/components/post-url/index.js b/packages/editor/src/components/post-url/index.js index c2b2ac8826b205..f4b18c4bb0b095 100644 --- a/packages/editor/src/components/post-url/index.js +++ b/packages/editor/src/components/post-url/index.js @@ -10,7 +10,7 @@ import { ExternalLink, Button, __experimentalInputControl as InputControl, - __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper, + __experimentalHStack as HStack, __experimentalVStack as VStack, } from '@wordpress/components'; import { store as noticesStore } from '@wordpress/notices'; @@ -77,98 +77,86 @@ export default function PostURL( { onClose } ) { return (
- + + + + { isEditable ? ( + <> + + { permalinkPrefix } + + + { postSlug } + + + { permalinkSuffix } + + + ) : ( + postLink + ) } + +
+ + } + /> + ) } ); diff --git a/packages/editor/src/components/post-url/panel.js b/packages/editor/src/components/post-url/panel.js index aca36566c04727..77d1b797a491ad 100644 --- a/packages/editor/src/components/post-url/panel.js +++ b/packages/editor/src/components/post-url/panel.js @@ -44,7 +44,7 @@ export default function PostURLPanel() { return ( - +