Skip to content

Commit

Permalink
prep build 07/09
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jul 9, 2024
2 parents 904f233 + 4ccb0f1 commit 87f5a56
Show file tree
Hide file tree
Showing 90 changed files with 1,043 additions and 465 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/packages/block-library/src/comment-template @michalczaplinski
/packages/block-library/src/comments @michalczaplinski
/packages/block-library/src/table-of-contents @ZebulanStanphill
/packages/block-library/src/image @artemiomorales @michalczaplinski
/packages/block-library/src/image @artemiomorales

# Duotone
/lib/block-supports/duotone.php
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/check-backport-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,15 @@ on:
- '!packages/e2e-tests/**'
jobs:
check:
name: Check CHANGELOG diff
name: Check for a Core backport changelog entry
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core Sync Required') && !contains(github.event.pull_request.labels.*.name, 'Backport from WordPress Core') }}
steps:
- name: 'Get PR commit count'
run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: ${{ env.PR_COMMIT_COUNT }}
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
- name: 'Fetch relevant history from origin'
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Check CHANGELOG status
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core Sync Required') && !contains(github.event.pull_request.labels.*.name, 'Backport from WordPress Core') }}
- name: Check the changelog folder
env:
PR_NUMBER: ${{ github.event.number }}
run: |
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/sync-backport-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Sync Core Backport Issue

on:
push:
branches:
- trunk

jobs:
sync-backport-changelog:
name: Sync Core Backport Issue
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 2 # Fetch the last two commits to compare changes
- name: Check for changes in backport-changelog
run: |
git diff --quiet HEAD^ HEAD -- backport-changelog || echo "changes=true" >> $GITHUB_OUTPUT
- name: Sync Issue
if: env.changes == 'true'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const labelName = '🤖 Sync Backport Changelog';
const issues = await github.paginate(github.rest.issues.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
labels: [labelName],
state: 'open',
per_page: 1,
});
if (issues.length === 0) {
console.log(`No issues found with the "${labelName}" label.`);
return;
}
const [latestIssue] = issues;
const versionMatch = latestIssue.title.match(/(\d+\.\d+)/);
if (!versionMatch) {
console.log('Could not find a version number in the latest issue title.');
return;
}
const version = versionMatch[1];
console.log(`Latest version: ${version}`);
const { execSync } = require('child_process');
const processedChangelog = execSync(`awk '/./ {print ($0 ~ /^[-*]/ ? " " : "- ") $0}' backport-changelog/${version}/*.md`).toString().trim();
const startDelimiter = '<!-- START TRUNK BACKPORT CHANGELOG -->';
const endDelimiter = '<!-- END TRUNK BACKPORT CHANGELOG -->';
const autoGeneratedContent = `${startDelimiter}\n${processedChangelog}\n${endDelimiter}`;
const regex = new RegExp(`${startDelimiter}[\\s\\S]*${endDelimiter}`);
let newBody;
if (regex.test(latestIssue.body)) {
// If delimiters exist, replace the content between them
newBody = latestIssue.body.replace(regex, autoGeneratedContent);
} else {
// If delimiters don't exist, append the new content at the end
newBody = `${latestIssue.body}\n\n${autoGeneratedContent}`;
}
if (newBody.trim() !== latestIssue.body.trim()) {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: latestIssue.number,
body: newBody
});
console.log('Issue description updated successfully.');
} else {
console.log('Issue description is already up to date.');
}
1 change: 1 addition & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./schemas/json/wp-env.json",
"core": "WordPress/WordPress",
"plugins": [ "." ],
"themes": [ "./test/emptytheme" ],
Expand Down
3 changes: 2 additions & 1 deletion backport-changelog/6.7/6910.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ https://github.com/WordPress/wordpress-develop/pull/6910

* https://github.com/WordPress/gutenberg/pull/59483
* https://github.com/WordPress/gutenberg/pull/60652
* https://github.com/WordPress/gutenberg/pull/62777
* https://github.com/WordPress/gutenberg/pull/62777
* https://github.com/WordPress/gutenberg/pull/63108
8 changes: 4 additions & 4 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Embed a simple audio player. ([Source](https://github.com/WordPress/gutenberg/tr
- **Name:** core/audio
- **Category:** media
- **Supports:** align, anchor, interactivity (clientNavigation), spacing (margin, padding)
- **Attributes:** autoplay, caption, id, loop, preload, src
- **Attributes:** autoplay, blob, caption, id, loop, preload, src

## Avatar

Expand Down Expand Up @@ -273,7 +273,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb
- **Name:** core/file
- **Category:** media
- **Supports:** align, anchor, color (background, gradients, link, ~~text~~), interactivity, spacing (margin, padding)
- **Attributes:** displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget
- **Attributes:** blob, displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget

## Footnotes

Expand Down Expand Up @@ -388,7 +388,7 @@ Insert an image to make a visual statement. ([Source](https://github.com/WordPre
- **Name:** core/image
- **Category:** media
- **Supports:** align (center, full, left, right, wide), anchor, color (~~background~~, ~~text~~), filter (duotone), interactivity, shadow ()
- **Attributes:** alt, aspectRatio, caption, height, href, id, lightbox, linkClass, linkDestination, linkTarget, rel, scale, sizeSlug, title, url, width
- **Attributes:** alt, aspectRatio, blob, caption, height, href, id, lightbox, linkClass, linkDestination, linkTarget, rel, scale, sizeSlug, title, url, width

## Latest Comments

Expand Down Expand Up @@ -958,6 +958,6 @@ Embed a video from your media library or upload a new one. ([Source](https://git
- **Name:** core/video
- **Category:** media
- **Supports:** align, anchor, interactivity (clientNavigation), spacing (margin, padding)
- **Attributes:** autoplay, caption, controls, id, loop, muted, playsInline, poster, preload, src, tracks
- **Attributes:** autoplay, blob, caption, controls, id, loop, muted, playsInline, poster, preload, src, tracks

<!-- END TOKEN Autogenerated - DO NOT EDIT -->
2 changes: 1 addition & 1 deletion docs/reference-guides/interactivity-api/iapi-about.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ store( 'wpmovies', {
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.ispen"
data-wp-bind--aria-expanded="context.isOpen"
aria-controls="p-1"
>
Toggle
Expand Down
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
if ( ! empty( $layout['rowCount'] ) ) {
$layout_styles[] = array(
'selector' => $selector,
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(8px, auto))' ),
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(1rem, auto))' ),
);
}
} elseif ( ! empty( $layout['columnCount'] ) ) {
Expand All @@ -512,7 +512,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
if ( ! empty( $layout['rowCount'] ) ) {
$layout_styles[] = array(
'selector' => $selector,
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(8px, auto))' ),
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(1rem, auto))' ),
);
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@
"@wordpress/warning": "file:packages/warning",
"@wordpress/widgets": "file:packages/widgets",
"@wordpress/wordcount": "file:packages/wordcount",
"es-module-shims": "^1.8.2",
"postcss-local-keyframes": "^0.0.2"
"es-module-shims": "^1.8.2"
},
"devDependencies": {
"@actions/core": "1.9.1",
Expand Down
12 changes: 1 addition & 11 deletions packages/block-editor/src/components/block-toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
.components-toolbar-group,
.components-toolbar {
background: none;
// IE11 has thick paddings without this.
line-height: 0;

// These margins make the buttons themselves overlap the chrome of the toolbar.
// This helps make them square, and maximize the hit area.
Expand Down Expand Up @@ -151,15 +149,7 @@
}

.block-editor-block-toolbar__slot {
// Required for IE11.
display: inline-block;
// Fix for toolbar button misalignment on IE11
line-height: 0;

// IE11 doesn't read rules inside this query. They are applied only to modern browsers.
@supports (position: sticky) {
display: inline-flex;
}
display: inline-flex;
}

.show-icon-labels {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ import deprecated from '@wordpress/deprecated';
import Inserter from '../inserter';

function ButtonBlockAppender(
{ rootClientId, className, onFocus, tabIndex },
{ rootClientId, className, onFocus, tabIndex, onSelect },
ref
) {
return (
<Inserter
position="bottom center"
rootClientId={ rootClientId }
__experimentalIsQuick
onSelectOrClose={ onSelect }
renderToggle={ ( {
onToggle,
disabled,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
/**
* WordPress dependencies
*/
import { CustomSelectControl } from '@wordpress/components';
import { privateApis as componentsPrivateApis } from '@wordpress/components';
import { useMemo } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import { getFontStylesAndWeights } from '../../utils/get-font-styles-and-weights';
import { unlock } from '../../lock-unlock';

const { CustomSelectControlV2Legacy: CustomSelectControl } = unlock(
componentsPrivateApis
);
/**
* Adjusts font appearance field label in case either font styles or weights
* are disabled.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.components-font-appearance-control {
ul {
li {
color: $gray-900;
text-transform: capitalize;
}
[role="option"] {
color: $gray-900;
text-transform: capitalize;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,14 @@
.components-toggle-control {
margin-bottom: 0;
}
.components-focal-point-picker-wrapper {
background-color: $gray-100;
width: 100%;
border-radius: $radius-block-ui;
border: $border-width solid $gray-300;
}
.components-focal-point-picker__media--image {
max-height: clamp(120px, 9vh, 280px);
max-height: 180px;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ export default function TypographyPanel( {
hasFontWeights={ hasFontWeights }
fontFamilyFaces={ fontFamilyFaces }
size="__unstable-large"
__nextHasNoMarginBottom
/>
</ToolsPanelItem>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
}
const variationSelector =
blockSelectors[ blockName ]
.styleVariationSelectors?.[ variationName ];
?.styleVariationSelectors?.[ variationName ];

// Process the variation's inner element styles.
// This comes before the inner block styles so the
Expand Down Expand Up @@ -700,18 +700,18 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
const variationBlockSelector = scopeSelector(
variationSelector,
blockSelectors[ variationBlockName ]
.selector
?.selector
);
const variationDuotoneSelector = scopeSelector(
variationSelector,
blockSelectors[ variationBlockName ]
.duotoneSelector
?.duotoneSelector
);
const variationFeatureSelectors =
scopeFeatureSelectors(
variationSelector,
blockSelectors[ variationBlockName ]
.featureSelectors
?.featureSelectors
);

const variationBlockStyleNodes =
Expand All @@ -728,10 +728,10 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
featureSelectors: variationFeatureSelectors,
fallbackGapValue:
blockSelectors[ variationBlockName ]
.fallbackGapValue,
?.fallbackGapValue,
hasLayoutSupport:
blockSelectors[ variationBlockName ]
.hasLayoutSupport,
?.hasLayoutSupport,
styles: variationBlockStyleNodes,
} );

Expand Down
Loading

0 comments on commit 87f5a56

Please sign in to comment.