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

Link UI: polish lightbox pieces. #58666

Merged
merged 3 commits into from
Feb 7, 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
6 changes: 4 additions & 2 deletions packages/block-editor/src/components/url-input/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ $input-size: 300px;
width: $input-size;
}
padding: $input-padding;
border: none;
border-radius: 0;
margin-left: 0;
margin-right: 0;

&:not(:focus) {
border-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused the text link editing popover to have a transparent border on the link combobox:

Link Control with no border on input

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding that. Perhaps the increase in CSS selector specificity for adding transparent borders caused this border to disappear unintentionally. In #58505, restoring the default border of the URL input field, i.e. removing this style itself, should resolve this issue.

image

}

/* Fonts smaller than 16px causes mobile safari to zoom. */
font-size: $mobile-text-min-font-size;
@include break-small {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
__experimentalVStack as VStack,
} from '@wordpress/components';
import {
Icon,
link as linkIcon,
image,
page,
Expand Down Expand Up @@ -342,9 +343,7 @@ const ImageURLInputUI = ( {
) }
{ ! url && ! isEditingLink && lightboxEnabled && (
<div className="block-editor-url-popover__expand-on-click">
<div className="fullscreen-icon">
{ fullscreen }
</div>
<Icon icon={ fullscreen } />
<div className="text">
<p>{ __( 'Expand on click' ) }</p>
<p className="description">
Expand All @@ -355,7 +354,6 @@ const ImageURLInputUI = ( {
</div>
<Button
icon={ linkOff }
className="remove-link"
label={ __( 'Disable expand on click' ) }
onClick={ () => {
onSetLightbox( false );
Expand Down
30 changes: 9 additions & 21 deletions packages/block-editor/src/components/url-popover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

.block-editor-url-popover__input-container {
padding: $grid-unit-10;
padding-left: $grid-unit-20;
}

.block-editor-url-popover__row {
Expand All @@ -17,7 +16,7 @@
// should take up as much space as possible.
.block-editor-url-popover__row > :not(.block-editor-url-popover__settings-toggle) {
flex-grow: 1;
gap: $grid-unit-05;
gap: $grid-unit-10;
}

.block-editor-url-popover__additional-controls .components-button.has-icon {
Expand Down Expand Up @@ -69,32 +68,21 @@
display: flex;
align-items: center;
min-width: $modal-min-width;
overflow: hidden;
white-space: nowrap;

.fullscreen-icon {
padding-right: $grid-unit-05;

> svg {
width: $icon-size;
height: $icon-size;
}
}

.text {
flex-grow: 1;

p {
margin: 0;
// This ensures the text and help text is 32px, which with
// padding makes the popover same height as the block toolbar.
line-height: $grid-unit-20;

&.description {
color: $gray-700;
font-size: $helptext-font-size;
}
}
}

.description {
color: $gray-600;
}

.remove-link {
margin-right: $grid-unit-10;
}

}
Loading