Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into update/jetpack-ai-br…
Browse files Browse the repository at this point in the history
…eve-release-50
  • Loading branch information
dhasilva committed Jul 30, 2024
2 parents 501acce + 778c0ed commit f1d9a7d
Show file tree
Hide file tree
Showing 234 changed files with 711 additions and 1,366 deletions.
9 changes: 9 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,14 @@ 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.16.0] - 2024-07-29
### Added
- AI Logo Generator: support placement property on the generator modal, for tracking purposes. [#38574]

### Fixed
- AI Logo Generator: make the initial prompt update when the site name and description are fully laoded from store. [#38491]
- AI Logo Generator: provide the saved media ID on the save logo callback. [#38552]

## [0.15.0] - 2024-07-22
### Added
- Jetpack AI: Add logo generator codebase to the ai-client package. [#38391]
Expand Down Expand Up @@ -358,6 +366,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated package dependencies. [#31659]
- Updated package dependencies. [#31785]

[0.16.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.15.0...v0.16.0
[0.15.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.6...v0.15.0
[0.14.6]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.5...v0.14.6
[0.14.5]: https://github.com/Automattic/jetpack-ai-client/compare/v0.14.4...v0.14.5
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Add comment to empty `catch` blocks. No change to functionality.


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

Update dependencies.
Fixup versions

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.16.0-alpha",
"version": "0.16.1-alpha",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,7 @@ export async function clearDeletedMedia( siteId: string ) {
responses
.filter( ( { exists } ) => ! exists )
.forEach( ( { mediaId } ) => removeLogo( { siteId, mediaId } ) );
} catch ( error ) {} // Assume that the media exists if there was a network error and do nothing to avoid data loss.
} catch ( error ) {
// Assume that the media exists if there was a network error and do nothing to avoid data loss.
}
}
5 changes: 5 additions & 0 deletions projects/js-packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### This is a list detailing changes for the Jetpack RNA Components package releases.

## [0.55.3] - 2024-07-30
### Changed
- React: Changing global JSX namespace to React.JSX [#38585]

## [0.55.2] - 2024-07-26
### Added
- Export button props type to be used elsewhere [#38549]
Expand Down Expand Up @@ -1102,6 +1106,7 @@
### Changed
- Update node version requirement to 14.16.1

[0.55.3]: https://github.com/Automattic/jetpack-components/compare/0.55.2...0.55.3
[0.55.2]: https://github.com/Automattic/jetpack-components/compare/0.55.1...0.55.2
[0.55.1]: https://github.com/Automattic/jetpack-components/compare/0.55.0...0.55.1
[0.55.0]: https://github.com/Automattic/jetpack-components/compare/0.54.4...0.55.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ export type NumberSliderProps = {
renderThumb?: (
props: HTMLPropsWithRefCallback< HTMLDivElement >,
state: { index: number; value: number | ReadonlyArray< number >; valueNow: number }
) => JSX.Element | null;
) => React.JSX.Element | null;
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type StatCardProps = {
/**
* The stat card icon.
*/
icon: JSX.Element;
icon: React.JSX.Element;

/**
* The stat label.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface StatusProps {
className?: string;
}

const Status = ( { className, label, status = 'inactive' }: StatusProps ): JSX.Element => {
const Status = ( { className, label, status = 'inactive' }: StatusProps ): React.JSX.Element => {
const defaultLabels: Record< string, string > = {
active: __( 'Active', 'jetpack' ),
error: __( 'Error', 'jetpack' ),
Expand Down
2 changes: 1 addition & 1 deletion projects/js-packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/jetpack-components",
"version": "0.55.2",
"version": "0.55.3",
"description": "Jetpack Components Package",
"author": "Automattic",
"license": "GPL-2.0-or-later",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Add comment to empty `catch` blocks. No change to functionality.


Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ try {
if ( globals?.es2022 ) {
flatBase.languageOptions.globals = globals.es2022;
}
} catch ( e ) {}
} catch ( e ) {
// `globals` is optional.
}

module.exports = flatBase;
4 changes: 4 additions & 0 deletions projects/js-packages/licensing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.12.21 - 2024-07-29
### Fixed
- Updated package dependencies. [#38464]

## 0.12.20 - 2024-07-22
### Changed
- Update dependencies. [#37982]
Expand Down
4 changes: 0 additions & 4 deletions projects/js-packages/licensing/changelog/prerelease

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/licensing/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-licensing",
"version": "0.12.21-alpha",
"version": "0.12.21",
"description": "Jetpack licensing flow",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/licensing/#readme",
"bugs": {
Expand Down
8 changes: 8 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,13 @@ 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.57.0] - 2024-07-29
### Added
- Added mentioning of Manual Sharing [#38411]

### Fixed
- Fixed broken connection notices to make them more helpful [#38450]

## [0.56.2] - 2024-07-22
### Fixed
- Fixed double request issue and simplifed refresh logic [#38350]
Expand Down Expand Up @@ -788,6 +795,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies. [#24470]

[0.57.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.56.2...v0.57.0
[0.56.2]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.56.1...v0.56.2
[0.56.1]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.56.0...v0.56.1
[0.56.0]: https://github.com/Automattic/jetpack-publicize-components/compare/v0.55.1...v0.56.0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.
Comment: Added version bumps.


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

Update dependencies.
Fixup versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Removed the unused code for image auto-conversion from social store

This file was deleted.

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

Social | Removed the media auto-conversion UI
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Social | Fixed and improved media auto conversion notices
1 change: 0 additions & 1 deletion projects/js-packages/publicize-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export { default as SocialPreviewsPanel } from './src/components/social-previews
export { default as SocialImageGeneratorPanel } from './src/components/social-image-generator/panel';
export { default as SocialImageGeneratorTemplatePickerModal } from './src/components/social-image-generator/template-picker/modal';
export { default as SocialImageGeneratorToggle } from './src/components/social-image-generator/toggle';
export { default as AutoConversionToggle } from './src/components/auto-conversion/toggle';
export { default as TemplatePickerButton } from './src/components/social-image-generator/template-picker/button';
export { default as PublicizePanel } from './src/components/panel';
export { default as ReviewPrompt } from './src/components/review-prompt';
Expand Down
2 changes: 1 addition & 1 deletion 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.57.0-alpha",
"version": "0.58.0-alpha",
"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 Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useSocialMediaConnections from '../../hooks/use-social-media-connections'
import { store } from '../../social-store';
import { Connection } from '../../social-store/types';
import Notice from '../notice';
import { SupportedService, useSupportedServices } from '../services/use-supported-services';
import { useServiceLabel } from '../services/use-service-label';
import styles from './styles.module.scss';
import { checkConnectionCode } from './utils';

Expand Down Expand Up @@ -40,20 +40,12 @@ export const BrokenConnectionsNotice: React.FC = () => {
<ExternalLink href={ connectionsAdminUrl } />
);

const supportedServices = useSupportedServices();
const getServiceLabel = useServiceLabel();

if ( ! brokenConnections.length ) {
return null;
}

const servicesMap = supportedServices.reduce< Record< string, SupportedService > >(
( acc, service ) => {
acc[ service.ID ] = service;
return acc;
},
{}
);

// Group broken connections by service
// Since Object.groupBy is not supported widely yet, we use a manual grouping
const brokenConnectionsList = brokenConnections.reduce< Record< string, Array< Connection > > >(
Expand All @@ -73,12 +65,7 @@ export const BrokenConnectionsNotice: React.FC = () => {
{ __( 'Your following connections need to be reconnected:', 'jetpack' ) }
<ul>
{ Object.entries( brokenConnectionsList ).map( ( [ service_name, connectionsList ] ) => {
const serviceLabel =
// For Jetpack sites, we should have the service in the map
// But for WPCOM sites, we might not have the service in the map yet
servicesMap[ service_name ]?.label ||
// So we capitalize the service name
service_name[ 0 ].toUpperCase() + service_name.substring( 1 );
const serviceLabel = getServiceLabel( service_name );

return (
<li key={ service_name }>
Expand Down
Loading

0 comments on commit f1d9a7d

Please sign in to comment.