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

Add prompt to zoom out separator #65392

Merged
merged 9 commits into from
Sep 27, 2024
Merged
12 changes: 12 additions & 0 deletions packages/block-editor/src/components/block-list/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,18 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
margin-left: -1px;
margin-right: -1px;
transition: background-color 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
font-size: $default-font-size;
font-family: $default-font;
color: $black;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs to be $gray-900.

$black: #000; // Use only when you truly need pure black. For UI, use $gray-900.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe you used $black because it needed that level of contrast?

If so let's add a comment to explain why we're using it.

Copy link
Contributor

@draganescu draganescu Sep 27, 2024

Choose a reason for hiding this comment

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

It feels on that gray we need black.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeh the contrast would be insufficient otherwise. Thanks for clarifying 👍

font-weight: normal;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasmussen Updated to force normal weight 👍


.is-zoomed-out & {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@draganescu Maybe this class got removed?

// Scale the font size based on the zoom level.
font-size: calc(#{$default-font-size} * ( 2 - var(--wp-block-editor-iframe-zoom-out-scale) ));
}

&.is-dragged-over {
background: $gray-400;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { useReducedMotion } from '@wordpress/compose';
import { useSelect } from '@wordpress/data';
import { useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -103,7 +104,19 @@ export function ZoomOutSeparator( {
data-is-insertion-point="true"
onDragOver={ () => setIsDraggedOver( true ) }
onDragLeave={ () => setIsDraggedOver( false ) }
></motion.div>
>
<motion.div
initial={ { opacity: 0 } }
animate={ { opacity: 1 } }
exit={ { opacity: 0 } }
transition={ {
type: 'tween',
duration: 0.1,
} }
>
{ __( 'Drop pattern.' ) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasmussen @draganescu Shall we run with this and then iterate? We have until RC 1 (October 22, 2024) to change this prior to the hard string freeze.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine from me, assuming we can polish up the little things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

...can polish up the little things.

You mean overall on Zoom Out mode? Yes we're need to polish during the Beta/RC phase for 6.7.

I think all the items you requested that are applicable directly to this PR have been addressed no? If not happy to tweak them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Overall zoom mode, though also figuring out the width issue. But yes, it's not clear to me if that's a side effect of this PR or not. But yeah, mostly mean the experience overall.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to ask folks working on Zoom Out to start testing everything on TT5 👍

I'll raise an Issue to track the width thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

What is wrong with two labels?

</motion.div>
</motion.div>
) }
</AnimatePresence>
);
Expand Down
Loading