Skip to content

Commit 94aa255

Browse files
jameskosterntsekourasjasmussen
authored andcommitted
Make post meta row button treatment consistent (WordPress#61954)
Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
1 parent 2fdc677 commit 94aa255

File tree

5 files changed

+17
-25
lines changed

5 files changed

+17
-25
lines changed

packages/editor/src/components/post-discussion/panel.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Dropdown,
77
Button,
88
__experimentalVStack as VStack,
9-
__experimentalText as Text,
109
} from '@wordpress/components';
1110
import { useSelect } from '@wordpress/data';
1211
import { useState, useMemo } from '@wordpress/element';
@@ -81,7 +80,7 @@ function PostDiscussionToggle( { isOpen, onClick } ) {
8180
aria-expanded={ isOpen }
8281
onClick={ onClick }
8382
>
84-
<Text>{ label }</Text>
83+
{ label }
8584
</Button>
8685
);
8786
}

packages/editor/src/components/post-discussion/style.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
}
1414
}
1515
.editor-post-discussion__panel-toggle {
16-
&.components-button {
17-
height: auto;
18-
}
16+
1917
.components-text {
2018
color: inherit;
2119
}

packages/editor/src/components/post-panel-row/style.scss

+15
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,26 @@
1111
min-height: $grid-unit-40;
1212
display: flex;
1313
align-items: center;
14+
padding: 6px 0; // Matches button to ensure alignment
15+
line-height: $grid-unit-05 * 5;
16+
hyphens: auto;
1417
}
1518

1619
.editor-post-panel__row-control {
1720
flex-grow: 1;
1821
min-height: $grid-unit-40;
1922
display: flex;
2023
align-items: center;
24+
25+
.components-button {
26+
max-width: 100%;
27+
text-align: left;
28+
text-wrap: pretty;
29+
height: auto;
30+
min-height: $button-size-compact;
31+
}
32+
33+
.components-dropdown {
34+
max-width: 100%;
35+
}
2136
}

packages/editor/src/components/post-schedule/style.scss

-11
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,3 @@
88
padding: $grid-unit-20;
99
}
1010
}
11-
12-
.editor-post-schedule__dialog-toggle.components-button {
13-
overflow: hidden;
14-
text-align: left;
15-
white-space: unset;
16-
height: auto;
17-
min-height: $button-size-compact;
18-
19-
// The line height + the padding should be the same as the button size.
20-
line-height: inherit;
21-
}

packages/editor/src/components/post-url/style.scss

-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22
width: 100%;
33
}
44

5-
.components-button.editor-post-url__panel-toggle {
6-
display: block;
7-
max-width: 100%;
8-
overflow: hidden;
9-
text-align: left;
10-
text-overflow: ellipsis;
11-
white-space: nowrap;
12-
}
13-
145
.editor-post-url__panel-dialog .editor-post-url {
156
// sidebar width - popover padding - form margin
167
min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20;

0 commit comments

Comments
 (0)