Skip to content

Commit

Permalink
prep build 09/09
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Sep 9, 2024
2 parents 491c415 + a89c8bd commit 8c2320d
Show file tree
Hide file tree
Showing 24 changed files with 161 additions and 98 deletions.
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"@octokit/rest": "16.26.0",
"@octokit/types": "6.34.0",
"@octokit/webhooks-types": "5.8.0",
"@playwright/test": "1.46.0",
"@playwright/test": "1.47.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
"@react-native/babel-preset": "0.73.10",
"@react-native/metro-babel-transformer": "0.73.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export function getCompatibilityStyles() {
// Don't try to add the reset styles, which were removed as a dependency
// from `edit-blocks` for the iframe since we don't need to reset admin
// styles.
if ( ownerNode.id === 'wp-reset-editor-styles-css' ) {
if (
[
'wp-reset-editor-styles-css',
'wp-reset-editor-styles-rtl-css',
].includes( ownerNode.id )
) {
return accumulator;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
__experimentalText as Text,
FlexBlock,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';

/**
* Internal dependencies
Expand All @@ -32,6 +33,7 @@ import {
myPatternsCategory,
INSERTER_PATTERN_TYPES,
} from './utils';
import { store as blockEditorStore } from '../../../store';

const noop = () => {};

Expand All @@ -42,6 +44,11 @@ export function PatternCategoryPreviews( {
category,
showTitlesAsTooltip,
} ) {
const isZoomOutMode = useSelect(
( select ) =>
select( blockEditorStore ).__unstableGetEditorMode() === 'zoom-out',
[]
);
const [ allPatterns, , onClickPattern ] = usePatternsState(
onInsert,
rootClientId,
Expand Down Expand Up @@ -163,23 +170,39 @@ export function PatternCategoryPreviews( {
</Text>
) }
</VStack>

{ currentCategoryPatterns.length > 0 && (
<BlockPatternsList
ref={ scrollContainerRef }
shownPatterns={ pagingProps.categoryPatternsAsyncList }
blockPatterns={ pagingProps.categoryPatterns }
onClickPattern={ onClickPattern }
onHover={ onHover }
label={ category.label }
orientation="vertical"
category={ category.name }
isDraggable
showTitlesAsTooltip={ showTitlesAsTooltip }
patternFilter={ patternSourceFilter }
pagingProps={ pagingProps }
/>
) }
<VStack spacing={ 4 }>
{ currentCategoryPatterns.length > 0 && (
<>
{ isZoomOutMode && (
<Text
size="12"
as="p"
className="block-editor-inserter__help-text"
>
{ __(
'Drag and drop patterns into the canvas.'
) }
</Text>
) }
<BlockPatternsList
ref={ scrollContainerRef }
shownPatterns={
pagingProps.categoryPatternsAsyncList
}
blockPatterns={ pagingProps.categoryPatterns }
onClickPattern={ onClickPattern }
onHover={ onHover }
label={ category.label }
orientation="vertical"
category={ category.name }
isDraggable
showTitlesAsTooltip={ showTitlesAsTooltip }
patternFilter={ patternSourceFilter }
pagingProps={ pagingProps }
/>
</>
) }
</VStack>
</>
);
}
4 changes: 4 additions & 0 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -709,3 +709,7 @@ $block-inserter-tabs-height: 44px;
}
}
}

.block-editor-tabbed-sidebar__tabpanel .block-editor-inserter__help-text {
padding: 0 $grid-unit-30;
}
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,15 @@ export function MediaPlaceholder( {

if ( isAudio ) {
instructions = __(
'Upload an audio file, pick one from your media library, or add one with a URL.'
'Upload or drag an audio file here, or pick one from your library.'
);
} else if ( isImage ) {
instructions = __(
'Upload an image file, pick one from your media library, or add one with a URL.'
'Upload or drag an image file here, or pick one from your library.'
);
} else if ( isVideo ) {
instructions = __(
'Upload a video file, pick one from your media library, or add one with a URL.'
'Upload or drag a video file here, or pick one from your library.'
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export function ImageEdit( {
instructions={
! lockUrlControls &&
__(
'Upload an image file, pick one from your media library, or add one with a URL.'
'Upload or drag an image file here, or pick one from your library.'
)
}
style={ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
</p>
<div className="wp-block-page-list-modal-buttons">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
{ __( 'Cancel' ) }
</Button>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ disabled }
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/page-list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ export default function PageListEdit( {
<PanelBody title={ __( 'Edit this menu' ) }>
<p>{ convertDescription }</p>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/post-comments-form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ const CommentsForm = ( { postId, postType } ) => {
if ( 'closed' === commentStatus ) {
const actions = [
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
key="enableComments"
onClick={ () => setCommentStatus( 'open' ) }
variant="primary"
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ export default function PostFeaturedImageEdit( {
mediaLibraryButton={ ( { open } ) => {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
icon={ upload }
variant="primary"
label={ label }
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,7 @@ export default function LogoEdit( {
render={ ( { open } ) => (
<div className="block-library-site-logo__inspector-upload-container">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
onClick={ open }
variant="secondary"
>
Expand Down Expand Up @@ -674,8 +673,7 @@ export default function LogoEdit( {
mediaLibraryButton={ ( { open } ) => {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
icon={ upload }
variant="primary"
label={ __( 'Choose logo' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/social-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const SocialLinkURLPopover = ( {
/>
</div>
<Button
// TODO: Switch to `true` (40px size) if possible
// TODO: Switch to `true` (40px size) if possible.
__next40pxDefaultSize={ false }
icon={ keyboardReturn }
label={ __( 'Apply' ) }
Expand Down
4 changes: 0 additions & 4 deletions packages/dataviews/src/dataviews-layouts/table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@
}
}

.dataviews-view-table__cell-content-wrapper:empty {
display: none;
}

/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
@container (max-width: 430px) {
.dataviews-view-table tr td:first-child,
Expand Down
1 change: 1 addition & 0 deletions packages/edit-post/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function initializeEditor(
showBlockBreadcrumbs: true,
showIconLabels: false,
showListViewByDefault: false,
enableChoosePatternModal: true,
isPublishSidebarEnabled: true,
} );

Expand Down
1 change: 1 addition & 0 deletions packages/edit-site/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function initializeEditor( id, settings ) {
openPanels: [ 'post-status' ],
showBlockBreadcrumbs: true,
showListViewByDefault: false,
enableChoosePatternModal: true,
} );

if ( window.__experimentalMediaProcessing ) {
Expand Down
1 change: 1 addition & 0 deletions packages/edit-site/src/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function initializePostsDashboard( id, settings ) {
openPanels: [ 'post-status' ],
showBlockBreadcrumbs: true,
showListViewByDefault: false,
enableChoosePatternModal: true,
} );

dispatch( editSiteStore ).updateSettings( settings );
Expand Down
Loading

0 comments on commit 8c2320d

Please sign in to comment.