Skip to content

Commit

Permalink
prep build 11/07
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Nov 7, 2024
2 parents e766b94 + 7874fc5 commit 669b052
Show file tree
Hide file tree
Showing 41 changed files with 1,538 additions and 1,176 deletions.
299 changes: 297 additions & 2 deletions changelog.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
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, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~

## Date

Expand Down
4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "19.6.0-rc.3",
"version": "19.6.0",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,30 @@ function splitStyleValue( value ) {
return value;
}

function splitGapValue( value ) {
// Check for shorthand value (a string value).
if ( value && typeof value === 'string' ) {
// If the value is a string, treat it as a single side (top) for the spacing controls.
return {
top: value,
};
function splitGapValue( value, isAxialGap ) {
if ( ! value ) {
return value;
}

if ( value ) {
return {
...value,
right: value?.left,
bottom: value?.top,
};
// Check for shorthand value (a string value).
if ( typeof value === 'string' ) {
/*
* Map the string value to appropriate sides for the spacing control depending
* on whether the current block has axial gap support or not.
*
* Note: The axial value pairs must match for the spacing control to display
* the appropriate horizontal/vertical sliders.
*/
return isAxialGap
? { top: value, right: value, bottom: value, left: value }
: { top: value };
}

return value;
return {
...value,
right: value?.left,
bottom: value?.top,
};
}

function DimensionsToolsPanel( {
Expand Down Expand Up @@ -325,13 +331,13 @@ export default function DimensionsPanel( {

// Block Gap
const showGapControl = useHasGap( settings );
const gapValue = decodeValue( inheritedValue?.spacing?.blockGap );
const gapValues = splitGapValue( gapValue );
const gapSides = Array.isArray( settings?.spacing?.blockGap )
? settings?.spacing?.blockGap
: settings?.spacing?.blockGap?.sides;
const isAxialGap =
gapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );
const gapValue = decodeValue( inheritedValue?.spacing?.blockGap );
const gapValues = splitGapValue( gapValue, isAxialGap );
const setGapValue = ( newGapValue ) => {
onChange(
setImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function TabbedSidebar(
icon={ closeSmall }
label={ closeButtonLabel }
onClick={ () => onClose() }
size="small"
size="compact"
/>

<Tabs.TabList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
border-bottom: $border-width solid $gray-300;
display: flex;
justify-content: space-between;
padding-right: $grid-unit-15;
padding-right: $grid-unit-10;
}


Expand Down
Loading

0 comments on commit 669b052

Please sign in to comment.