Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into renovate/wordpress-m…
Browse files Browse the repository at this point in the history
…onorepo
  • Loading branch information
anomiex committed Dec 2, 2024
2 parents a2410c4 + b7ea553 commit dffd77c
Show file tree
Hide file tree
Showing 482 changed files with 4,966 additions and 4,305 deletions.
8 changes: 8 additions & 0 deletions .github/files/e2e-tests/e2e-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ const projects = [
suite: '',
buildGroup: 'jetpack-core',
},
{
project: 'Jetpack post editor',
path: 'projects/plugins/jetpack/tests/e2e',
testArgs: [ 'specs/editor', '--retries=1' ],
targets: [ 'plugins/jetpack', 'packages/publicize' ],
suite: '',
buildGroup: 'jetpack-core',
},
{
project: 'Jetpack sync',
path: 'projects/plugins/jetpack/tests/e2e',
Expand Down
192 changes: 118 additions & 74 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Board triage: add automated triage for Photon.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Labeling: automatically label changes to the External Media extension.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Slack reporting: update logic.


Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ async function getLabelsToAdd( octokit, owner, repo, number, isDraft, isRevert )
}
}

// External Media extension.
const externalMedia = file.match(
/^projects\/plugins\/jetpack\/extensions\/shared\/external-media\//
);
if ( externalMedia !== null ) {
keywords.add( '[Extension] External Media' );
}

// React Dashboard and Boost Admin.
const reactAdmin = file.match(
/^(projects\/plugins\/(crm|boost\/app)\/admin|projects\/plugins\/jetpack\/_inc\/client)\//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ export const automatticAssignments = {
},
Boost: {
team: 'Heart of Gold',
labels: [ '[Plugin] Boost' ],
labels: [
'[Plugin] Boost',
'[Boost Feature] Lazy Images',
'[Boost Feature] Image Guide',
'[Boost Feature] Image Size Analysis',
],
slack_id: 'C016BBAFHHS',
board_id: 'https://github.com/orgs/Automattic/projects/548',
},
Expand Down Expand Up @@ -126,6 +131,12 @@ export const automatticAssignments = {
slack_id: 'C02NQ4HMJKV',
board_id: 'https://github.com/orgs/Automattic/projects/657',
},
Photon: {
team: 'Heart of Gold',
labels: [ '[Feature] Photon', '[Boost Feature] Image CDN', '[Package] Image CDN' ],
slack_id: 'C016BBAFHHS',
board_id: 'https://github.com/orgs/Automattic/projects/548',
},
Protect: {
team: 'Scan',
labels: [ '[Plugin] Protect', '[Feature] Protect', '[Package] WAF' ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function sendSlackMessage( message, channel, payload, customMessageFormat
} catch ( error ) {
// The request failed.
// At this point, we want to log specific types of errors (let's avoid noise by logging temporary errors for example).
if ( ! error.code === ErrorCode.PlatformError ) {
if ( error.code !== ErrorCode.PlatformError ) {
return false;
}

Expand Down
3 changes: 1 addition & 2 deletions projects/js-packages/components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ module.exports = {
'@wordpress/i18n-text-domain': [
'error',
{
// @todo: Change this to something not "jetpack".
allowedTextDomain: 'jetpack',
allowedTextDomain: 'jetpack-components',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: major
Type: changed

Changed text domain from 'jetpack' to 'jetpack-components'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Adjust orders of JS imports in various files for new eslint config. Should make no difference to functionality.


Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ActionButton = props => {
loadingText,
isDisabled,
displayError = false,
errorMessage = __( 'An error occurred. Please try again.', 'jetpack' ),
errorMessage = __( 'An error occurred. Please try again.', 'jetpack-components' ),
customClass,
} = props;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ActionPopover = ( {
if ( showSteps ) {
stepsText = sprintf(
/* translators: 1 Current step, 2 Total steps */
__( '%1$d of %2$d', 'jetpack' ),
__( '%1$d of %2$d', 'jetpack-components' ),
step,
totalSteps
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type React from 'react';
*/
const AdminPage: React.FC< AdminPageProps > = ( {
children,
moduleName = __( 'Jetpack', 'jetpack' ),
moduleName = __( 'Jetpack', 'jetpack-components' ),
moduleNameHref,
showHeader = true,
showFooter = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AutomatticBylineLogoProps } from './types';
* @return {React.ReactNode} AutomatticBylineLogo component.
*/
const AutomatticBylineLogo: React.FC< AutomatticBylineLogoProps > = ( {
title = __( 'An Automattic Airline', 'jetpack' ),
title = __( 'An Automattic Airline', 'jetpack-components' ),
height = 7,
className,
...otherProps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const BoostScoreBar: FunctionComponent< BoostScoreBarProps > = ( {
}

const prevScoreOffset = ( prevScore / score ) * 100;
const desktopIconLabel = __( 'Desktop score', 'jetpack' );
const mobileIconLabel = __( 'Mobile score', 'jetpack' );
const desktopIconLabel = __( 'Desktop score', 'jetpack-components' );
const mobileIconLabel = __( 'Mobile score', 'jetpack-components' );

const getIcon = () => {
if ( scoreBarType === 'desktop' ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,69 +31,79 @@ export const Tooltip: FunctionComponent = ( { period }: { period: Period } ) =>
<div className="jb-score-tooltip">
<div className="jb-score-tooltip__date">{ date }</div>
<div className="jb-score-tooltip__row">
<div className="jb-score-tooltip__column">{ __( 'Overall score', 'jetpack' ) }</div>
<div className="jb-score-tooltip__column">
{ __( 'Overall score', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ scoreLetter }</div>
</div>
<hr />
<div className="jb-score-tooltip__row">
<div className="jb-score-tooltip__column">{ __( 'Desktop score', 'jetpack' ) }</div>
<div className="jb-score-tooltip__column">
{ __( 'Desktop score', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">
{
/* translators: %d is the score */
sprintf( __( '%d / 100', 'jetpack' ), desktop_overall_score )
sprintf( __( '%d / 100', 'jetpack-components' ), desktop_overall_score )
}
</div>
</div>
{ typeof desktop_lcp === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">
{ __( 'Largest Contentful Paint', 'jetpack' ) }
{ __( 'Largest Contentful Paint', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2fs', desktop_lcp ) }</div>
</div>
) }
{ typeof desktop_tbt === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">{ __( 'Total Blocking Time', 'jetpack' ) }</div>
<div className="jb-score-tooltip__column">
{ __( 'Total Blocking Time', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2fs', desktop_tbt ) }</div>
</div>
) }
{ typeof desktop_cls === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">
{ __( 'Cumulative Layout Shift', 'jetpack' ) }
{ __( 'Cumulative Layout Shift', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2f', desktop_cls ) }</div>
</div>
) }
<hr />
<div className="jb-score-tooltip__row">
<div className="jb-score-tooltip__column">{ __( 'Mobile score', 'jetpack' ) }</div>
<div className="jb-score-tooltip__column">
{ __( 'Mobile score', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">
{
/* translators: %d is the score */
sprintf( __( '%d / 100', 'jetpack' ), mobile_overall_score )
sprintf( __( '%d / 100', 'jetpack-components' ), mobile_overall_score )
}
</div>
</div>
{ typeof mobile_lcp === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">
{ __( 'Largest Contentful Paint', 'jetpack' ) }
{ __( 'Largest Contentful Paint', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2fs', mobile_lcp ) }</div>
</div>
) }
{ typeof mobile_tbt === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">{ __( 'Total Blocking Time', 'jetpack' ) }</div>
<div className="jb-score-tooltip__column">
{ __( 'Total Blocking Time', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2fs', mobile_tbt ) }</div>
</div>
) }
{ typeof mobile_cls === 'number' && (
<div className="jb-score-tooltip__row jb-score-tooltip__row--secondary">
<div className="jb-score-tooltip__column">
{ __( 'Cumulative Layout Shift', 'jetpack' ) }
{ __( 'Cumulative Layout Shift', 'jetpack-components' ) }
</div>
<div className="jb-score-tooltip__column">{ sprintf( '%0.2f', mobile_cls ) }</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default function UplotLineChart( { range, periods, annotations = [] }: Up
},
series: [
{
label: __( 'Date', 'jetpack' ),
label: __( 'Date', 'jetpack-components' ),
value: ( self: uPlot, rawValue: number ) => {
// outputs legend content - value available when mouse is hovering the chart
if ( ! rawValue ) {
Expand All @@ -161,8 +161,8 @@ export default function UplotLineChart( { range, periods, annotations = [] }: Up
return date.toLocaleDateString( getUserLocale() );
},
},
createSerieInfo( __( 'Desktop', 'jetpack' ), lastDesktopScore ),
createSerieInfo( __( 'Mobile', 'jetpack' ), lastMobileScore ),
createSerieInfo( __( 'Desktop', 'jetpack-components' ), lastDesktopScore ),
createSerieInfo( __( 'Mobile', 'jetpack-components' ), lastMobileScore ),
],
scales: {
x: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Button = forwardRef< HTMLInputElement, ButtonProps >( ( props, ref ) => {
<VisuallyHidden as="span">
{
/* translators: accessibility text */
__( '(opens in a new tab)', 'jetpack' )
__( '(opens in a new tab)', 'jetpack-components' )
}
</VisuallyHidden>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export const CopyToClipboard: React.FC< CopyToClipboardProps > = ( {
icon = hasCopied ? <CheckmarkIcon /> : <ClipboardIcon />;
}

const defaultLabel = __( 'Copy to clipboard', 'jetpack' );
const defaultLabel = __( 'Copy to clipboard', 'jetpack-components' );

if ( 'icon' !== buttonStyle ) {
label = hasCopied ? __( 'Copied!', 'jetpack' ) : defaultLabel;
label = hasCopied ? __( 'Copied!', 'jetpack-components' ) : defaultLabel;
}

return (
Expand Down
38 changes: 19 additions & 19 deletions projects/js-packages/components/components/gridicon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,45 @@ class Gridicon extends Component< GridiconProps > {
default:
return '';
case 'gridicons-audio':
return __( 'Has audio.', 'jetpack' );
return __( 'Has audio.', 'jetpack-components' );
case 'gridicons-arrow-left':
return __( 'Arrow left', 'jetpack' );
return __( 'Arrow left', 'jetpack-components' );
case 'gridicons-arrow-right':
return __( 'Arrow right', 'jetpack' );
return __( 'Arrow right', 'jetpack-components' );
case 'gridicons-calendar':
return __( 'Is an event.', 'jetpack' );
return __( 'Is an event.', 'jetpack-components' );
case 'gridicons-cart':
return __( 'Is a product.', 'jetpack' );
return __( 'Is a product.', 'jetpack-components' );
case 'chevron-down':
return __( 'Show filters', 'jetpack' );
return __( 'Show filters', 'jetpack-components' );
case 'gridicons-comment':
return __( 'Matching comment.', 'jetpack' );
return __( 'Matching comment.', 'jetpack-components' );
case 'gridicons-cross':
return __( 'Close.', 'jetpack' );
return __( 'Close.', 'jetpack-components' );
case 'gridicons-filter':
return __( 'Toggle search filters.', 'jetpack' );
return __( 'Toggle search filters.', 'jetpack-components' );
case 'gridicons-folder':
return __( 'Category', 'jetpack' );
return __( 'Category', 'jetpack-components' );
case 'gridicons-help-outline':
return __( 'Help', 'jetpack' );
return __( 'Help', 'jetpack-components' );
case 'gridicons-info':
case 'gridicons-info-outline':
return __( 'Information.', 'jetpack' );
return __( 'Information.', 'jetpack-components' );
case 'gridicons-image-multiple':
return __( 'Has multiple images.', 'jetpack' );
return __( 'Has multiple images.', 'jetpack-components' );
case 'gridicons-image':
return __( 'Has an image.', 'jetpack' );
return __( 'Has an image.', 'jetpack-components' );
case 'gridicons-page':
return __( 'Page', 'jetpack' );
return __( 'Page', 'jetpack-components' );
case 'gridicons-post':
return __( 'Post', 'jetpack' );
return __( 'Post', 'jetpack-components' );
case 'gridicons-jetpack-search':
case 'gridicons-search':
return __( 'Magnifying Glass', 'jetpack' );
return __( 'Magnifying Glass', 'jetpack-components' );
case 'gridicons-tag':
return __( 'Tag', 'jetpack' );
return __( 'Tag', 'jetpack-components' );
case 'gridicons-video':
return __( 'Has a video.', 'jetpack' );
return __( 'Has a video.', 'jetpack-components' );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const IndeterminateProgressBar: React.FC< IndeterminateProgressBarProps > = ( {
return (
<div
className={ clsx( className, styles[ 'indeterminate-progress-bar' ] ) }
aria-label={ __( 'Indeterminate Progress Bar', 'jetpack' ) }
aria-label={ __( 'Indeterminate Progress Bar', 'jetpack-components' ) }
/>
);
};
Expand Down
Loading

0 comments on commit dffd77c

Please sign in to comment.