-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Styles Sidebar: Tweak spacing #40588
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
*/ | ||
import { | ||
__experimentalItemGroup as ItemGroup, | ||
__experimentalItem as Item, | ||
__experimentalHStack as HStack, | ||
__experimentalSpacer as Spacer, | ||
__experimentalVStack as VStack, | ||
FlexItem, | ||
CardBody, | ||
|
@@ -37,7 +37,7 @@ function ScreenRoot() { | |
return ( | ||
<Card size="small"> | ||
<CardBody> | ||
<VStack spacing={ 2 }> | ||
<VStack spacing={ 4 }> | ||
<Card> | ||
<CardMedia> | ||
<StylesPreview /> | ||
|
@@ -55,22 +55,28 @@ function ScreenRoot() { | |
</HStack> | ||
</NavigationButton> | ||
) } | ||
<ContextMenu /> | ||
</VStack> | ||
</CardBody> | ||
|
||
<CardBody> | ||
<ContextMenu /> | ||
</CardBody> | ||
|
||
<CardDivider /> | ||
|
||
<CardBody> | ||
<Spacer | ||
as="p" | ||
paddingTop={ 2 } | ||
/* | ||
* 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border). | ||
* This is an ad hoc override for this particular instance only and should be reconsidered before making into a pattern. | ||
*/ | ||
paddingX="13px" | ||
marginBottom={ 4 } | ||
> | ||
{ __( | ||
'Customize the appearance of specific blocks for the whole site.' | ||
) } | ||
</Spacer> | ||
<ItemGroup> | ||
<Item> | ||
{ __( | ||
'Customize the appearance of specific blocks for the whole site.' | ||
) } | ||
</Item> | ||
<NavigationButton path="/blocks"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of Maybe a reminder for us to name components in a way that sufficiently evokes the HTML semantics? Another instance of semantic misuse is addressed in #40590. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I agree that I think that the issue with I can think of two approaches to improve the situation:
WDYT ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I would probably argue that anything that's visually grouped together using
This, absolutely. But also, I kind of think we should switch to using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In principle I agree with this. The only worry that I have is to avoid coupling semantics and visual look, but the rest of your reply also partially addresses that.
This all makes sense. I'd be curious to know the original reasoning for using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a conversation between @ItsJonQ and @diegohaz about the semantics of |
||
<HStack justify="space-between"> | ||
<FlexItem>{ __( 'Blocks' ) }</FlexItem> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't like this approach, but given the conversation in #40533 (comment) and following, I'm ok to allow it as a rare exception.