Skip to content

Commit

Permalink
prep build 1/17
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jan 17, 2025
2 parents 32b96d3 + a900e03 commit 16eb232
Show file tree
Hide file tree
Showing 23 changed files with 223 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # v1.207.0
- uses: ruby/setup-ruby@7a6302104fbeea3c6aaa43b1b91e08f7d6623279 # v1.209.0
with:
# `.ruby-version` file location
working-directory: packages/react-native-editor/ios
Expand Down
1 change: 1 addition & 0 deletions backport-changelog/6.8/8123.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/8123

* https://github.com/WordPress/gutenberg/pull/68549
* https://github.com/WordPress/gutenberg/pull/68745
4 changes: 2 additions & 2 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe
- **Name:** core/details
- **Category:** text
- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** allowedBlocks, showContent, summary
- **Attributes:** allowedBlocks, name, showContent, summary

## Embed

Expand Down Expand Up @@ -616,7 +616,7 @@ Displays the contents of a post or page. ([Source](https://github.com/WordPress/

- **Name:** core/post-content
- **Category:** theme
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~

## Date

Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.8/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function gutenberg_update_page_editor_support( $args ) {
if ( false !== $editor_support_key ) {
unset( $args['supports'][ $editor_support_key ] );
$args['supports']['editor'] = array(
'default_mode' => 'template-locked',
'default-mode' => 'template-locked',
);
}

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ import { SelectControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { InspectorControls } from '@wordpress/block-editor';

/**
* Internal dependencies
*/
import { htmlElementMessages } from '../../utils/messages';

export default function CommentsInspectorControls( {
attributes: { tagName },
setAttributes,
} ) {
const htmlElementMessages = {
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
};
return (
<InspectorControls>
<InspectorControls group="advanced">
Expand Down
22 changes: 1 addition & 21 deletions packages/block-library/src/cover/edit/inspector-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
import { unlock } from '../../lock-unlock';
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
import { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';
import { htmlElementMessages } from '../../utils/messages';

const { cleanEmptyObject, ResolutionTool } = unlock( blockEditorPrivateApis );

Expand Down Expand Up @@ -183,27 +184,6 @@ export default function CoverInspectorControls( {

const colorGradientSettings = useMultipleOriginColorsAndGradients();

const htmlElementMessages = {
header: __(
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
),
main: __(
'The <main> element should be used for the primary content of your document only.'
),
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
article: __(
'The <article> element should represent a self-contained, syndicatable portion of the document.'
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
footer: __(
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
),
};

const dropdownMenuProps = useToolsPanelDropdownMenuProps();

return (
Expand Down
6 changes: 6 additions & 0 deletions packages/block-library/src/details/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"source": "rich-text",
"selector": "summary"
},
"name": {
"type": "string",
"source": "attribute",
"attribute": "name",
"selector": ".wp-block-details"
},
"allowedBlocks": {
"type": "array"
}
Expand Down
17 changes: 16 additions & 1 deletion packages/block-library/src/details/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
InspectorControls,
} from '@wordpress/block-editor';
import {
TextControl,
ToggleControl,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
Expand All @@ -30,7 +31,7 @@ const TEMPLATE = [
];

function DetailsEdit( { attributes, setAttributes } ) {
const { showContent, summary, allowedBlocks } = attributes;
const { name, showContent, summary, allowedBlocks } = attributes;
const blockProps = useBlockProps();
const innerBlocksProps = useInnerBlocksProps( blockProps, {
template: TEMPLATE,
Expand Down Expand Up @@ -75,6 +76,20 @@ function DetailsEdit( { attributes, setAttributes } ) {
</ToolsPanelItem>
</ToolsPanel>
</InspectorControls>
<InspectorControls group="advanced">
<TextControl
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Name attribute' ) }
value={ name || '' }
onChange={ ( newName ) =>
setAttributes( { name: newName } )
}
help={ __(
'Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.'
) }
/>
</InspectorControls>
<details { ...innerBlocksProps } open={ isOpen }>
<summary
onClick={ ( event ) => {
Expand Down
8 changes: 6 additions & 2 deletions packages/block-library/src/details/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import { RichText, useBlockProps, InnerBlocks } from '@wordpress/block-editor';

export default function save( { attributes } ) {
const { showContent } = attributes;
const { name, showContent } = attributes;
const summary = attributes.summary ? attributes.summary : 'Details';
const blockProps = useBlockProps.save();

return (
<details { ...blockProps } open={ showContent }>
<details
{ ...blockProps }
name={ name || undefined }
open={ showContent }
>
<summary>
<RichText.Content value={ summary } />
</summary>
Expand Down
21 changes: 1 addition & 20 deletions packages/block-library/src/group/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { View } from '@wordpress/primitives';
* Internal dependencies
*/
import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
import { htmlElementMessages } from '../utils/messages';

/**
* Render inspector controls for the Group block.
Expand All @@ -29,26 +30,6 @@ import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
* @return {JSX.Element} The control group.
*/
function GroupEditControls( { tagName, onSelectTagName } ) {
const htmlElementMessages = {
header: __(
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
),
main: __(
'The <main> element should be used for the primary content of your document only.'
),
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
article: __(
'The <article> element should represent a self-contained, syndicatable portion of the document.'
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
footer: __(
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
),
};
return (
<InspectorControls group="advanced">
<SelectControl
Expand Down
6 changes: 0 additions & 6 deletions packages/block-library/src/home-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
aria-label={ __( 'Home link text' ) }
placeholder={ __( 'Add home link' ) }
withoutInteractiveFormatting
allowedFormats={ [
'core/bold',
'core/italic',
'core/image',
'core/strikethrough',
] }
/>
</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/post-content/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"color": {
"gradients": true,
"heading": true,
"link": true,
"__experimentalDefaultControls": {
"background": false,
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/post-terms/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export default function PostTermsEdit( {
key={ postTerm.id }
href={ postTerm.link }
onClick={ ( event ) => event.preventDefault() }
rel="tag"
>
{ decodeEntities( postTerm.name ) }
</a>
Expand Down
12 changes: 1 addition & 11 deletions packages/block-library/src/query/edit/query-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import QueryInspectorControls from './inspector-controls';
import EnhancedPaginationModal from './enhanced-pagination-modal';
import { getQueryContextFromTemplate } from '../utils';
import QueryToolbar from './query-toolbar';
import { htmlElementMessages } from '../../utils/messages';

const DEFAULTS_POSTS_PER_PAGE = 3;

Expand Down Expand Up @@ -132,17 +133,6 @@ export default function QueryContent( {
setAttributes( {
displayLayout: { ...displayLayout, ...newDisplayLayout },
} );
const htmlElementMessages = {
main: __(
'The <main> element should be used for the primary content of your document only.'
),
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
};

return (
<>
Expand Down
46 changes: 35 additions & 11 deletions packages/block-library/src/read-more/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,55 @@ import {
RichText,
useBlockProps,
} from '@wordpress/block-editor';
import { ToggleControl, PanelBody } from '@wordpress/components';
import {
ToggleControl,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

export default function ReadMore( {
attributes: { content, linkTarget },
setAttributes,
insertBlocksAfter,
} ) {
const blockProps = useBlockProps();
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

return (
<>
<InspectorControls>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
__nextHasNoMarginBottom
<ToolsPanel
label={ __( 'Settings' ) }
resetAll={ () => setAttributes( { linkTarget: '_self' } ) }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
label={ __( 'Open in new tab' ) }
onChange={ ( value ) =>
setAttributes( {
linkTarget: value ? '_blank' : '_self',
} )
isShownByDefault
hasValue={ () => linkTarget !== '_self' }
onDeselect={ () =>
setAttributes( { linkTarget: '_self' } )
}
checked={ linkTarget === '_blank' }
/>
</PanelBody>
>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Open in new tab' ) }
onChange={ ( value ) =>
setAttributes( {
linkTarget: value ? '_blank' : '_self',
} )
}
checked={ linkTarget === '_blank' }
/>
</ToolsPanelItem>
</ToolsPanel>
</InspectorControls>
<RichText
identifier="content"
Expand Down
Loading

0 comments on commit 16eb232

Please sign in to comment.