Skip to content

Commit

Permalink
Merge branch 'trunk' into update/node-20
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor authored Nov 9, 2023
2 parents 643f7b0 + d17abbf commit fe07b86
Show file tree
Hide file tree
Showing 115 changed files with 951 additions and 648 deletions.
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

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

AI Client: ensure dispatching unclear error prompt once per request/response
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export default class SuggestionsEventSource extends EventTarget {
isPromptClear: boolean;
controller: AbortController;

// Flag to detect if the unclear prompt event was already dispatched
errorUnclearPromptTriggered: boolean;

constructor( data: SuggestionsEventSourceConstructorArgs ) {
super();
this.fullMessage = '';
Expand Down Expand Up @@ -157,6 +160,9 @@ export default class SuggestionsEventSource extends EventTarget {
bodyData.model = options.model;
}

// Clean the unclear prompt trigger flag
this.errorUnclearPromptTriggered = false;

await fetchEventSource( url, {
openWhenHidden: true,
method: 'POST',
Expand Down Expand Up @@ -257,8 +263,19 @@ export default class SuggestionsEventSource extends EventTarget {
*/
const replacedMessage = this.fullMessage.replace( /__|(\*\*)/g, '' );
if ( replacedMessage.startsWith( 'JETPACK_AI_ERROR' ) ) {
/*
* Check if the unclear prompt event was already dispatched,
* to ensure that it is dispatched only once per request.
*/
if ( this.errorUnclearPromptTriggered ) {
return;
}
this.errorUnclearPromptTriggered = true;

// The unclear prompt marker was found, so we dispatch an error event
this.dispatchEvent( new CustomEvent( ERROR_UNCLEAR_PROMPT ) );
debug( 'Unclear error prompt dispatched' );

this.dispatchEvent(
new CustomEvent( ERROR_RESPONSE, {
detail: getErrorData( ERROR_UNCLEAR_PROMPT ),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fixed

Fix react warnings in Boost Score Graph.
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ export const Background: FunctionComponent = () => {
<path
d="M-42 98C-42 98 -23.5 83.5 13.5 82C50.5 80.5 67 95 96 94.5C125 94 162.495 76.7241 178 75.5C216 72.5 243.5 65.5 261 78.5C278.5 91.5 308.5 161 344 163.5C379.5 166 394 91.5 426 79.5C458 67.5 473.5 92 509.5 91.5C545.5 91 562 76 592 75.5C622 75 648.5 83.5 675 83.5C701.5 83.5 759 75.5 759 75.5L844 67.5C844 67.5 884.5 66 926 59.5C967.5 53 1008 30.5 1008 30.5"
stroke="#069E08"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<circle cx="1008" cy="30.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="926" cy="59.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="843" cy="67.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="759" cy="75.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="675" cy="83.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="593" cy="75.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="509" cy="91.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="427" cy="79.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="343" cy="163.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="261" cy="78.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="178" cy="75.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="96" cy="94.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="14" cy="82.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<circle cx="1008" cy="30.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="926" cy="59.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="843" cy="67.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="759" cy="75.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="675" cy="83.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="593" cy="75.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="509" cy="91.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="427" cy="79.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="343" cy="163.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="261" cy="78.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="178" cy="75.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="96" cy="94.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="14" cy="82.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<path
opacity="0.16"
d="M261 99.9992C239 87.4992 207 98.0875 178 95.9992C149 93.911 124 98.3228 96 109.911C68 121.499 46 142.146 14 149.823C-18 157.499 -43 147.999 -43 147.999V198.999H1009V44.4992C1009 44.4992 962 66.9992 926 75.4992C890 83.9993 869.5 81.9992 843 78.4992C816.5 74.9993 789.5 39.4992 759 40.4992C728.5 41.4993 699.5 96.4992 676.5 99.9992C653.5 103.499 612.5 95.4992 593.5 95.4992C574.5 95.4992 524.5 111.499 509.5 111.999C494.5 112.499 455.5 111.499 427 115.499C398.5 119.499 372 138.999 344 138.999C316 138.999 283 112.499 261 99.9992Z"
Expand All @@ -121,23 +121,23 @@ export const Background: FunctionComponent = () => {
<path
d="M-41.5 148.5C-41.5 148.5 -8 156.639 21 148.32C50 140 66.5 122 95.5 109.351C124.5 96.7013 145.5 93.0007 178 95.5006C210.5 98.0005 236.5 86.5006 262 100.501C287.5 114.501 310.5 140.001 344 138.501C377.5 137.001 396 121.501 427 115.501C458 109.501 489 113.001 510.5 111.501C532 110.001 572.5 96.0006 593 95.5006C613.5 95.0006 646.5 103.001 676 99.5006C705.5 96.0006 719 43.5006 759 41.5006C799 39.5006 805 72.0006 844 78.5006C883 85.0006 901 78.5006 925 75.5006C949 72.5006 1008 45.5006 1008 45.5006"
stroke="#069E08"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<circle cx="178" cy="95.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="96" cy="109.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="14" cy="149.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="261" cy="100.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="343" cy="138.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="427" cy="115.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="509" cy="111.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="593" cy="95.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="675" cy="99.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="759" cy="41.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="843" cy="78.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="926" cy="75.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
<circle cx="1008" cy="45.5" r="2.75" fill="white" stroke="#069E08" stroke-width="1.5" />
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<circle cx="178" cy="95.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="96" cy="109.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="14" cy="149.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="261" cy="100.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="343" cy="138.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="427" cy="115.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="509" cy="111.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="593" cy="95.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="675" cy="99.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="759" cy="41.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="843" cy="78.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="926" cy="75.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
<circle cx="1008" cy="45.5" r="2.75" fill="white" stroke="#069E08" strokeWidth="1.5" />
</g>
<defs>
<filter
Expand All @@ -147,9 +147,9 @@ export const Background: FunctionComponent = () => {
width="1185.3"
height="239.127"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
colorInterpolationFilters="sRGB"
>
<feFlood flood-opacity="0" result="BackgroundImageFix" />
<feFlood floodOpacity="0" result="BackgroundImageFix" />
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
<feGaussianBlur stdDeviation="4" result="effect1_foregroundBlur_3726_6340" />
</filter>
Expand All @@ -161,8 +161,8 @@ export const Background: FunctionComponent = () => {
y2="199"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#069E08" />
<stop offset="1" stop-color="#069E08" stop-opacity="0" />
<stop stopColor="#069E08" />
<stop offset="1" stopColor="#069E08" stopOpacity="0" />
</linearGradient>
<linearGradient
id="paint1_linear_3726_6340"
Expand All @@ -172,8 +172,8 @@ export const Background: FunctionComponent = () => {
y2="220.999"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#069E08" />
<stop offset="1" stop-color="#069E08" stop-opacity="0" />
<stop stopColor="#069E08" />
<stop offset="1" stopColor="#069E08" stopOpacity="0" />
</linearGradient>
</defs>
</svg>
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.44.5-alpha",
"version": "0.45.0-alpha",
"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,4 @@
Significance: minor
Type: added

Allow cookieinformationscanner and facebookexternalhit to be detected as bots
2 changes: 1 addition & 1 deletion projects/packages/device-detection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "1.4.x-dev"
"dev-trunk": "1.5.x-dev"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,8 @@ public static function is_bot_user_agent( $ua = null ) {
'domaintunocrawler',
'grapeshotcrawler',
'cloudflare-alwaysonline',
'cookieinformationscanner', // p1699315886066389-slack-C0438NHCLSY
'facebookexternalhit', // https://www.facebook.com/externalhit_uatext.php
);

foreach ( $bot_agents as $bot_agent ) {
Expand Down
5 changes: 5 additions & 0 deletions projects/packages/jetpack-mu-wpcom/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).

## [4.18.0] - 2023-11-09
### Added
- Take id_map in consideration when checking if a task is completed inside wpcom_launchpad_is_task_option_completed. [#34009]

## [4.17.0] - 2023-11-08
### Added
- Added Launchpad tasks and task list to the Subscriber page. [#33948]
Expand Down Expand Up @@ -425,6 +429,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Testing initial package release.

[4.18.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.17.0...v4.18.0
[4.17.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.16.2...v4.17.0
[4.16.2]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.16.1...v4.16.2
[4.16.1]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v4.16.0...v4.16.1
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom",
"version": "4.18.0-alpha",
"version": "4.18.0",

Check failure on line 4 in projects/packages/jetpack-mu-wpcom/package.json

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 4.18.1-alpha but found 4.18.0! You might use `tools/project-version.sh -f -u 4.18.1-alpha packages/jetpack-mu-wpcom` or `tools/fixup-project-versions.sh` to fix this.
"description": "Enhances your site with features powered by WordPress.com",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class Jetpack_Mu_Wpcom {

const PACKAGE_VERSION = '4.18.0-alpha';
const PACKAGE_VERSION = '4.18.0';

Check failure on line 17 in projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 4.18.1-alpha but found 4.18.0! You might use `tools/project-version.sh -f -u 4.18.1-alpha packages/jetpack-mu-wpcom` or `tools/fixup-project-versions.sh` to fix this.
const PKG_DIR = __DIR__ . '/../';

/**
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/backup/composer.lock

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

2 changes: 0 additions & 2 deletions projects/plugins/boost/app/assets/src/css/admin-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
@import 'components/checklist';
@import 'components/icons';
@import 'components/badge';
@import 'components/support';
@import 'components/snackbar';
@import 'components/icon-tooltip';
@import 'components/pricing-table.scss';

// React Migration CSS
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $no_boost_score_size: 28px;
}
}

button {
.action-button {
color: $gray_90;

&.components-button.is-link {
Expand Down Expand Up @@ -156,7 +156,7 @@ $no_boost_score_size: 28px;
height:12px;
transform:translate(-50%,50%) rotate(45deg);
background-color:$primary-white;

@include box-shadow();
}
}
Expand Down
13 changes: 0 additions & 13 deletions projects/plugins/boost/app/assets/src/css/components/support.scss

This file was deleted.

This file was deleted.

Loading

0 comments on commit fe07b86

Please sign in to comment.