Skip to content

Commit

Permalink
Add components level better alignment and wrapping for long text data
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmekhokan committed May 16, 2024
1 parent 9c3284c commit 319c3c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
9 changes: 9 additions & 0 deletions packages/editor/src/components/post-panel-row/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@
min-height: $grid-unit-40;
display: flex;
align-items: center;

.components-dropdown .components-button {
height: auto;
line-height: inherit;
min-height: 32px;
overflow: hidden;
text-align: left;
white-space: unset;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function BlockThemeControl( { id } ) {
label={ __( 'Template options' ) }
text={ decodeEntities( template.title ) }
icon={ null }
className="editor-post-template__panel-dropdown"
>
{ ( { onClose } ) => (
<>
Expand Down
2 changes: 0 additions & 2 deletions packages/editor/src/components/post-template/classic-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function PostTemplateToggle( { isOpen, onClick } ) {
aria-expanded={ isOpen }
aria-label={ __( 'Template options' ) }
onClick={ onClick }
className="editor-post-template__classic-panel-toggle"
>
{ templateTitle ?? __( 'Default template' ) }
</Button>
Expand Down Expand Up @@ -206,7 +205,6 @@ function ClassicThemeControl() {
return (
<Dropdown
popoverProps={ POPOVER_PROPS }
className="editor-post-template__classic-panel-dropdown"
focusOnMount
renderToggle={ ( { isOpen, onToggle } ) => (
<PostTemplateToggle isOpen={ isOpen } onClick={ onToggle } />
Expand Down
15 changes: 0 additions & 15 deletions packages/editor/src/components/post-template/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,3 @@
.editor-post-template__classic-theme-dropdown {
padding: $grid-unit-10;
}

.editor-post-template__panel-dropdown,
.editor-post-template__classic-panel-dropdown {
width: 100%;
}

.editor-post-template__panel-dropdown .components-dropdown-menu__toggle,
.editor-post-template__classic-panel-dropdown .editor-post-template__classic-panel-toggle {
display: block;
max-width: 100%;
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
}

0 comments on commit 319c3c9

Please sign in to comment.