Skip to content
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

Make post meta row button treatment consistent #61954

Merged
merged 6 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/editor/src/components/post-discussion/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Dropdown,
Button,
__experimentalVStack as VStack,
__experimentalText as Text,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { useState, useMemo } from '@wordpress/element';
Expand Down Expand Up @@ -81,7 +80,7 @@ function PostDiscussionToggle( { isOpen, onClick } ) {
aria-expanded={ isOpen }
onClick={ onClick }
>
<Text>{ label }</Text>
{ label }
</Button>
);
}
Expand Down
4 changes: 1 addition & 3 deletions packages/editor/src/components/post-discussion/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
}
}
.editor-post-discussion__panel-toggle {
&.components-button {
height: auto;
}

.components-text {
color: inherit;
}
Expand Down
15 changes: 15 additions & 0 deletions packages/editor/src/components/post-panel-row/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,26 @@
min-height: $grid-unit-40;
display: flex;
align-items: center;
padding: 6px 0; // Matches button to ensure alignment
line-height: $grid-unit-05 * 5;
hyphens: auto;
}

.editor-post-panel__row-control {
flex-grow: 1;
min-height: $grid-unit-40;
display: flex;
align-items: center;

.components-button {
max-width: 100%;
text-align: left;
text-wrap: pretty;
height: auto;
min-height: $button-size-compact;
}

.components-dropdown {
max-width: 100%;
}
}
11 changes: 0 additions & 11 deletions packages/editor/src/components/post-schedule/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,3 @@
padding: $grid-unit-20;
}
}

.editor-post-schedule__dialog-toggle.components-button {
overflow: hidden;
text-align: left;
white-space: unset;
height: auto;
min-height: $button-size-compact;

// The line height + the padding should be the same as the button size.
line-height: inherit;
}
9 changes: 0 additions & 9 deletions packages/editor/src/components/post-url/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
width: 100%;
}

.components-button.editor-post-url__panel-toggle {
display: block;
max-width: 100%;
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
}

.editor-post-url__panel-dialog .editor-post-url {
// sidebar width - popover padding - form margin
min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20;
Expand Down
Loading