Skip to content

Commit

Permalink
Merge branch 'trunk' into rnmobile/fix-empty-videopress-v5-block-when…
Browse files Browse the repository at this point in the history
…-no-id
  • Loading branch information
Siobhan committed Feb 27, 2024
2 parents bacf2f6 + 7194ccb commit 1cc9e8f
Show file tree
Hide file tree
Showing 236 changed files with 2,642 additions and 1,311 deletions.
618 changes: 439 additions & 179 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: fixed

Boost: Fix [Boost Feature] labels
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ async function getLabelsToAdd( octokit, owner, repo, number, isDraft, isRevert )
keywords.add( `[mu wpcom Feature] ${ cleanName( muWpcomFeatureName ) }` );
}

// Boost Critical CSS.
// Boost Features
const boostModules = file.match(
/^projects\/plugins\/boost\/app\/(?:modules|features)\/(?<boostModule>[^/]*)\//
/^projects\/plugins\/boost\/app\/(?:modules|features)\/(?:optimizations\/)?(?<boostModule>[^/]*)\//
);
const boostModuleName = boostModules && boostModules.groups.boostModule;
if ( boostModuleName ) {
Expand Down
10 changes: 10 additions & 0 deletions projects/js-packages/ai-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2024-02-26
### Added
- Add upgrade message for free tier [#35794]

### Changed
- Updated package dependencies. [#35793]
- Voice to Content: Add audio analyser to media recording hook [#35877]
- Voice to Content: Make transcriptions cancelable and add onProcess callback [#35737]

## [0.7.0] - 2024-02-19
### Added
- AI Client: add support for audio transcriptions. [#35691]
Expand Down Expand Up @@ -220,6 +229,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated package dependencies. [#31659]
- Updated package dependencies. [#31785]

[0.8.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/Automattic/jetpack-ai-client/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.5.1...v0.6.0
Expand Down
5 changes: 0 additions & 5 deletions projects/js-packages/ai-client/changelog/add-tsc-presets

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/ai-client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "@automattic/jetpack-ai-client",
"version": "0.8.0-alpha",
"version": "0.8.0",
"description": "A JS client for consuming Jetpack AI services",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme",
"bugs": {
Expand Down
22 changes: 9 additions & 13 deletions projects/js-packages/ai-client/src/components/ai-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
import { PlainText } from '@wordpress/block-editor';
import { Button, ButtonGroup } from '@wordpress/components';
import { useKeyboardShortcut } from '@wordpress/compose';
import {
forwardRef,
useImperativeHandle,
useRef,
useEffect,
useCallback,
} from '@wordpress/element';
import { useImperativeHandle, useRef, useEffect, useCallback } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Icon, closeSmall, check, arrowUp, trash, reusableBlock } from '@wordpress/icons';
import classNames from 'classnames';
import { forwardRef } from 'react';
import React from 'react';
/**
* Internal dependencies
Expand All @@ -25,6 +20,7 @@ import { GuidelineMessage } from './message.js';
* Types
*/
import type { RequestingStateProp } from '../../types.js';
import type { ReactElement } from 'react';
type AiControlProps = {
disabled?: boolean;
value: string;
Expand All @@ -35,15 +31,15 @@ type AiControlProps = {
isTransparent?: boolean;
state?: RequestingStateProp;
showGuideLine?: boolean;
customFooter?: React.ReactElement;
customFooter?: ReactElement;
onChange?: ( newValue: string ) => void;
onSend?: ( currentValue: string ) => void;
onStop?: () => void;
onAccept?: () => void;
onDiscard?: () => void;
showRemove?: boolean;
bannerComponent?: React.ReactElement;
errorComponent?: React.ReactElement;
bannerComponent?: ReactElement;
errorComponent?: ReactElement;
};

// eslint-disable-next-line @typescript-eslint/no-empty-function
Expand All @@ -54,7 +50,7 @@ const noop = () => {};
*
* @param {AiControlProps} props - Component props.
* @param {React.MutableRefObject} ref - Ref to the component.
* @returns {React.ReactElement} Rendered component.
* @returns {ReactElement} Rendered component.
*/
export function AIControl(
{
Expand All @@ -77,8 +73,8 @@ export function AIControl(
bannerComponent = null,
errorComponent = null,
}: AiControlProps,
ref: React.MutableRefObject< null > // eslint-disable-line @typescript-eslint/ban-types
): React.ReactElement {
ref: React.MutableRefObject< null >
): ReactElement {
const promptUserInputRef = useRef( null );
const loading = state === 'requesting' || state === 'suggesting';
const [ editRequest, setEditRequest ] = React.useState( false );
Expand Down
5 changes: 2 additions & 3 deletions projects/js-packages/ai-client/src/data-flow/context.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* External dependencies
*/
import { createContext } from '@wordpress/element';
import React from 'react';
import React, { createContext } from 'react';
/**
* Types & Constants
*/
Expand Down Expand Up @@ -61,7 +60,7 @@ type AiDataContextProviderProps = {
*
* @returns {AiDataContextProps} Context.
*/
export const AiDataContext = createContext( {} as AiDataContextProps );
export const AiDataContext = createContext< AiDataContextProps | object >( {} );

/**
* AI Data Context Provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { useCallback, useContext, useEffect } from '@wordpress/element';
import { useCallback, useContext, useEffect } from 'react';
/**
* Internal dependencies
*/
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function useAiContext( {
onSuggestion,
onError,
}: UseAiContextOptions = {} ): AiDataContextProps {
const context = useContext( AiDataContext );
const context = useContext( AiDataContext ) as AiDataContextProps;
const { eventSource } = context;

const done = useCallback( ( event: CustomEvent ) => onDone?.( event?.detail ), [ onDone ] );
Expand Down
11 changes: 11 additions & 0 deletions projects/js-packages/publicize-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.48.0] - 2024-02-26
### Added
- Added toggle to Social admin page for the Social Notes [#35681]

### Changed
- Added description to social previews for titleless posts [#35728]

### Removed
- Removed a notice to tell users that instagram is new nad can be connected [#35860]

## [0.47.1] - 2024-02-13
### Changed
- Updated package dependencies. [#35608]
Expand Down Expand Up @@ -590,6 +600,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies. [#24470]

[0.48.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.47.1...v0.48.0
[0.47.1]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.47.0...v0.47.1
[0.47.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.46.0...v0.47.0
[0.46.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.45.2...v0.46.0
Expand Down

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions projects/js-packages/publicize-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-publicize-components",
"version": "0.48.0-alpha",
"version": "0.48.0",
"description": "A library of JS components required by the Publicize editor plugin",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/publicize-components/#readme",
"bugs": {
Expand All @@ -22,7 +22,7 @@
"@automattic/jetpack-components": "workspace:*",
"@automattic/jetpack-connection": "workspace:*",
"@automattic/jetpack-shared-extension-utils": "workspace:*",
"@automattic/social-previews": "2.0.1-beta.10",
"@automattic/social-previews": "2.0.1-beta.12",
"@wordpress/annotations": "2.51.0",
"@wordpress/api-fetch": "6.48.0",
"@wordpress/block-editor": "12.19.0",
Expand Down Expand Up @@ -50,7 +50,7 @@
"@babel/core": "7.23.5",
"@babel/plugin-transform-react-jsx": "7.23.4",
"@babel/preset-react": "7.23.3",
"@babel/runtime": "7.23.5",
"@babel/runtime": "7.23.8",
"@testing-library/dom": "9.3.4",
"@testing-library/react": "14.2.0",
"@testing-library/user-event": "14.5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import { SOCIAL_STORE_ID, CONNECTION_SERVICE_INSTAGRAM_BUSINESS } from '../../so
* @returns {React.ReactNode} The Instagram tab component.
*/
export function Instagram( props ) {
const { title, image, media } = props;
const { title, image, media, description } = props;
const { username: name, profileImage } = useSelect( select =>
select( SOCIAL_STORE_ID ).getConnectionProfileDetails( CONNECTION_SERVICE_INSTAGRAM_BUSINESS )
);

const { message: text } = useSocialMediaMessage();

const caption = text || title;
const caption = text || title || description;

return (
<InstagramPreviews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { SOCIAL_STORE_ID, CONNECTION_SERVICE_LINKEDIN } from '../../social-store
* @returns {React.ReactNode} The linkedin tab component.
*/
export function LinkedIn( props ) {
const { title, url, image, media } = props;
const { title, url, image, media, description: postDescription } = props;

const { displayName: name, profileImage } = useSelect( select =>
select( SOCIAL_STORE_ID ).getConnectionProfileDetails( CONNECTION_SERVICE_LINKEDIN )
Expand All @@ -21,7 +21,7 @@ export function LinkedIn( props ) {
const { message: text } = useSocialMediaMessage();

// Add the URL to the description if there is media
const description = `${ text || title } ${ media.length ? url : '' }`.trim();
const description = `${ text || title || postDescription } ${ media.length ? url : '' }`.trim();

return (
<LinkedInPreviews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SOCIAL_STORE_ID, CONNECTION_SERVICE_NEXTDOOR } from '../../social-store
* @returns {React.ReactNode} The linkedin tab component.
*/
export function Nextdoor( props ) {
const { title, url, image, media } = props;
const { title, url, image, media, description: postDescription } = props;

const { displayName: name, profileImage } = useSelect( select =>
select( SOCIAL_STORE_ID ).getConnectionProfileDetails( CONNECTION_SERVICE_NEXTDOOR )
Expand All @@ -20,7 +20,7 @@ export function Nextdoor( props ) {
const { message: text } = useSocialMediaMessage();

// Add the URL to the description if there is media
const description = `${ text || title } ${ media.length ? url : '' }`.trim();
const description = `${ text || title || postDescription } ${ media.length ? url : '' }`.trim();

return (
<NextdoorPreviews
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Increasing backup version for new endpoint
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use Exception;
use WP_Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

/**
* Manage installation, deletion and cleanup of Helper Scripts to assist with backing up Jetpack Sites.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use Exception;
use Throwable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use WorDBless\BaseTestCase;
use WP_Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use Exception;
use PHPUnit\Framework\TestCase;
Expand Down
4 changes: 2 additions & 2 deletions projects/packages/backup/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
}

// Clean up expired Helper Scripts from a scheduled event.
$add_action( 'jetpack_backup_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Backup\\V0002\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) );
$add_action( 'jetpack_backup_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) );

// Register REST routes.
$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Backup\\V0002\\REST_Controller', 'register_rest_routes' ) );
$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Backup\\V0003\\REST_Controller', 'register_rest_routes' ) );

// Set up package version hook.
$add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Backup\\Package_Version::send_package_version_to_tracker' );
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Real time backups: Add endpoints orders to be used in real-time backups jetpack
2 changes: 1 addition & 1 deletion projects/packages/backup/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"link-template": "https://github.com/Automattic/jetpack-backup/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "3.1.x-dev"
"dev-trunk": "3.2.x-dev"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/backup/src/class-initial-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use Automattic\Jetpack\Connection\Plugin_Storage as Connection_Plugin_Storage;
use Automattic\Jetpack\Status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide
// to load an older/newer version of the class (if, for example, both the standalone and bundled versions of the plugin
// are installed, or in some other cases).
namespace Automattic\Jetpack\Backup\V0002;
namespace Automattic\Jetpack\Backup\V0003;

use function get_option;
use function update_option;
Expand Down
Loading

0 comments on commit 1cc9e8f

Please sign in to comment.