From ea0ea782b827cb0a9f1e4a3672394ae7f95bb411 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Mon, 16 Sep 2024 02:03:54 -0500 Subject: [PATCH 001/230] Put Replace in own group to give it borders (#64849) Co-authored-by: jeryj Co-authored-by: richtabor Co-authored-by: MaggieCabrera --- packages/block-library/src/image/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js index 60d83f89129070..1673d36e463d5a 100644 --- a/packages/block-library/src/image/image.js +++ b/packages/block-library/src/image/image.js @@ -559,7 +559,8 @@ export default function Image( { const mediaReplaceFlow = isSingleSelected && ! isEditingImage && ! lockUrlControls && ( - + // For contentOnly mode, put this button in its own area so it has borders around it. + Date: Mon, 16 Sep 2024 09:27:24 +0200 Subject: [PATCH 002/230] Pass the comments query paged arg to functions (#63698) Co-authored-by: SantosGuillamot Co-authored-by: ockham Co-authored-by: gziolo --- packages/block-library/src/comments-pagination-next/index.php | 2 +- .../block-library/src/comments-pagination-previous/index.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/comments-pagination-next/index.php b/packages/block-library/src/comments-pagination-next/index.php index cb8350e561b6e4..14a323df3a13ae 100644 --- a/packages/block-library/src/comments-pagination-next/index.php +++ b/packages/block-library/src/comments-pagination-next/index.php @@ -37,7 +37,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo $label .= $pagination_arrow; } - $next_comments_link = get_next_comments_link( $label, $max_page ); + $next_comments_link = get_next_comments_link( $label, $max_page, $comment_vars['paged'] ); remove_filter( 'next_posts_link_attributes', $filter_link_attributes ); diff --git a/packages/block-library/src/comments-pagination-previous/index.php b/packages/block-library/src/comments-pagination-previous/index.php index 092a28da677922..b70a9f609da9f0 100644 --- a/packages/block-library/src/comments-pagination-previous/index.php +++ b/packages/block-library/src/comments-pagination-previous/index.php @@ -29,7 +29,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content, }; add_filter( 'previous_comments_link_attributes', $filter_link_attributes ); - $previous_comments_link = get_previous_comments_link( $label ); + $comment_vars = build_comment_query_vars_from_block( $block ); + $previous_comments_link = get_previous_comments_link( $label, $comment_vars['paged'] ); remove_filter( 'previous_comments_link_attributes', $filter_link_attributes ); From 38e74db14c27f4ae075eebcf12ee846fcd20fd8b Mon Sep 17 00:00:00 2001 From: Damon Cook Date: Mon, 16 Sep 2024 04:33:38 -0400 Subject: [PATCH 003/230] Add JSDoc block for getSectionRootClientId in block editor package (#65219) * Add JSDoc block for getSectionRootClientId in block editor * Apply suggestions from code review Co-authored-by: Dave Smith --------- Co-authored-by: Dave Smith --- packages/block-editor/src/store/private-selectors.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index d76f90bc94ffe1..01ad8f69febc9e 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -548,6 +548,15 @@ export function isZoomOutMode( state ) { return state.editorMode === 'zoom-out'; } +/** + * Retrieves the client ID of the block which contains the blocks + * acting as "sections" in the editor. This is typically the "main content" + * of the template/post. + * + * @param {Object} state Editor state. + * + * @return {string|undefined} The section root client ID or undefined if not set. + */ export function getSectionRootClientId( state ) { return state.settings?.[ sectionRootClientIdKey ]; } From 4ca78cdf8ec71ba62dbf4403662202872d8e5888 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Mon, 16 Sep 2024 19:35:24 +0900 Subject: [PATCH 004/230] Fix Tabs styling in Font Library modal (#65330) Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: DaniGuardiola Co-authored-by: ciampo --- .../global-styles/font-library-modal/index.js | 52 +++++++++---------- .../font-library-modal/style.scss | 19 ++++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/index.js b/packages/edit-site/src/components/global-styles/font-library-modal/index.js index 5af4be90fecdcf..495652f144275e 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/index.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/index.js @@ -66,8 +66,8 @@ function FontLibraryModal( { isFullScreen className="font-library-modal" > -
- + +
{ tabs.map( ( { id, title } ) => ( @@ -75,30 +75,30 @@ function FontLibraryModal( { ) ) } - { tabs.map( ( { id } ) => { - let contents; - switch ( id ) { - case 'upload-fonts': - contents = ; - break; - case 'installed-fonts': - contents = ; - break; - default: - contents = ; - } - return ( - - { contents } - - ); - } ) } - -
+
+ { tabs.map( ( { id } ) => { + let contents; + switch ( id ) { + case 'upload-fonts': + contents = ; + break; + case 'installed-fonts': + contents = ; + break; + default: + contents = ; + } + return ( + + { contents } + + ); + } ) } + ); } diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/style.scss b/packages/edit-site/src/components/global-styles/font-library-modal/style.scss index a9a0784cbcb5a1..8d6f8a3c9b0af3 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/style.scss +++ b/packages/edit-site/src/components/global-styles/font-library-modal/style.scss @@ -129,18 +129,17 @@ $footer-height: 70px; padding-bottom: $grid-unit-20; } -.font-library-modal__tabs { - [role="tablist"] { - position: sticky; - top: 0; - border-bottom: 1px solid $gray-300; - background: $white; - margin: 0 #{$grid-unit-40 * -1}; - padding: 0 $grid-unit-20; - z-index: 1; - } +.font-library-modal__tablist { + position: sticky; + top: 0; + border-bottom: 1px solid $gray-300; + background: $white; + margin: 0 #{$grid-unit-40 * -1}; + padding: 0 $grid-unit-20; + z-index: 1; } + .font-library-modal__upload-area { align-items: center; display: flex; From c80fc61804e99268eec4441e2915b33368c30b18 Mon Sep 17 00:00:00 2001 From: Hit Bhalodia <58802366+hbhalodia@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:38:43 +0530 Subject: [PATCH 005/230] Fix: Button: Replace remaining 40px default size violation [Edit Site 2] (#65258) * Fix font library modal fonts to use 40px default button size * Fix install font button to use default 40px size * Fix the installed fonts button size to use 40px default * Fix upload font button size to use 40px default size * Fix add the default button 40px size for randomize color pallete button * Fix edit site style revision button to use 40px default size * Fix edit site shadow components buttons to use default 40px size * Fix the style for the button height on the font library modal * Add !important to override the button size for 40px Co-authored-by: hbhalodia Co-authored-by: mirka <0mirka00@git.wordpress.org> --- .../global-styles/font-library-modal/font-card.js | 3 +-- .../font-library-modal/font-collection.js | 3 +-- .../font-library-modal/installed-fonts.js | 6 ++---- .../global-styles/font-library-modal/style.scss | 12 ++++++++++-- .../global-styles/font-library-modal/upload-fonts.js | 3 +-- .../src/components/global-styles/palette.js | 3 +-- .../screen-revisions/revisions-buttons.js | 3 +-- .../components/global-styles/shadows-edit-panel.js | 12 ++++-------- 8 files changed, 21 insertions(+), 24 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js b/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js index 735179588d0723..579c6564fdf3e7 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js @@ -28,8 +28,7 @@ function FontCard( { font, onClick, variantsText, navigatorPath } ) { return ( - - - ); +export const Default: StoryObj< typeof ButtonGroup > = { + args: { + children: ( + <> + + + + ), + }, }; - -export const Default: StoryFn< typeof ButtonGroup > = Template.bind( {} ); From 1a23ed6b08b4e7204ac02592c6a137f6edd8d84c Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:52:19 +1000 Subject: [PATCH 014/230] Image cropping: skip making an API request if there are no changes to apply (#65384) Co-authored-by: andrewserong Co-authored-by: ajlende Co-authored-by: annezazu --- .../src/components/image-editor/use-save-image.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/block-editor/src/components/image-editor/use-save-image.js b/packages/block-editor/src/components/image-editor/use-save-image.js index ff91a9794ca158..094ce1600545b5 100644 --- a/packages/block-editor/src/components/image-editor/use-save-image.js +++ b/packages/block-editor/src/components/image-editor/use-save-image.js @@ -54,6 +54,13 @@ export default function useSaveImage( { } ); } + if ( modifiers.length === 0 ) { + // No changes to apply. + setIsInProgress( false ); + onFinishEditing(); + return; + } + apiFetch( { path: `/wp/v2/media/${ id }/edit`, method: 'POST', From f82bc32212f2708851bd10e3c2d803994cd3cb3c Mon Sep 17 00:00:00 2001 From: Akshat Kakkad <87222220+AKSHAT2802@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:25:33 +0530 Subject: [PATCH 015/230] Add __next40pxDefaultSize for files in editor 3 (#65139) * Add __next40pxDefaultSize for files in editor 3 * Address feedback * change font size to 13 px * Revert classic-theme.js changes as it will be a seperate PR and revert 13px size in style as it is default * Wrap copy button in InputControlSuffixWrapper Co-authored-by: AKSHAT2802 Co-authored-by: tyxla Co-authored-by: ciampo Co-authored-by: mirka <0mirka00@git.wordpress.org> --- .../hierarchical-term-selector.js | 3 +-- .../post-taxonomies/most-used-terms.js | 3 +-- .../src/components/post-taxonomies/style.scss | 4 ---- packages/editor/src/components/post-url/index.js | 16 +++++++++------- .../src/components/save-publish-panels/index.js | 8 ++------ 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js index 4913cef9b4c86f..071453f4f3f626 100644 --- a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js @@ -428,8 +428,7 @@ export function HierarchicalTermSelector( { slug } ) { { ! loading && hasCreateAction && ( ); diff --git a/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js b/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js index 085ca38a3e182a..156a15e2f460ca 100644 --- a/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js +++ b/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js @@ -44,8 +44,7 @@ export default function InserterSidebar() { >