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-production-10
  • Loading branch information
dhasilva committed Jul 22, 2024
2 parents 1bdf30d + 18ef499 commit 4d6814a
Show file tree
Hide file tree
Showing 124 changed files with 1,354 additions and 547 deletions.
47 changes: 3 additions & 44 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,5 @@
Significance: patch
Type: changed
Comment: Replace eslint disable of `wpcalypso/no-unsafe-wp-apis` with `@wordpress/no-unsafe-wp-apis`. No change to functionality.


Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Button } from '@automattic/jetpack-components';
// eslint-disable-next-line wpcalypso/no-unsafe-wp-apis
import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components'; // eslint-disable-line @wordpress/no-unsafe-wp-apis
import { useDispatch, useSelect } from '@wordpress/data';
import { createInterpolateElement, useCallback, useReducer } from '@wordpress/element';
import { __, _x, sprintf } from '@wordpress/i18n';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Button, useGlobalNotices } from '@automattic/jetpack-components';
import {
BaseControl,
FlexBlock,
// eslint-disable-next-line wpcalypso/no-unsafe-wp-apis
__experimentalHStack as HStack,
__experimentalHStack as HStack, // eslint-disable-line @wordpress/no-unsafe-wp-apis
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useCallback, useMemo } from '@wordpress/element';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable wpcalypso/no-unsafe-wp-apis */
import { useGlobalNotices } from '@automattic/jetpack-components';
import {
PanelBody,
ToggleControl,
Button,
__experimentalHStack as HStack,
__experimentalHStack as HStack, // eslint-disable-line @wordpress/no-unsafe-wp-apis
} from '@wordpress/components';
import { useCallback, useState, Fragment } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

ExPlat: add condition to prevent fetching the experiment assignment if there's not anon id (meaning that Tracks is likely disabled)
5 changes: 5 additions & 0 deletions projects/packages/explat/src/client/assignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ const fetchExperimentAssignment =
experimentName: string;
anonId: string | null;
} ): Promise< unknown > => {
if ( ! anonId ) {
throw new Error( `Tracking is disabled, can't fetch experimentAssignment` );
}

const params = {
experiment_name: experimentName,
anon_id: anonId ?? undefined,
as_connected_user: asConnectedUser,
};

const assignmentsRequestUrl = addQueryArgs( 'jetpack/v4/explat/assignments', params );

return await apiFetch( { path: assignmentsRequestUrl } );
Expand Down
5 changes: 5 additions & 0 deletions projects/packages/forms/changelog/remove-calypso-eslint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Replace eslint disable of `wpcalypso/no-unsafe-wp-apis` with `@wordpress/no-unsafe-wp-apis`. No change to functionality.


5 changes: 5 additions & 0 deletions projects/packages/forms/changelog/remove-calypso-eslint#2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: removed
Comment: Remove `wpcalypso/jsx-classname-namespace` from eslint config, eslint-plugin-wpcalypso is being removed.


1 change: 0 additions & 1 deletion projects/packages/forms/src/blocks/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = {
'react/react-in-jsx-scope': 0,
'space-unary-ops': 0,
'space-before-function-paren': 0,
'wpcalypso/jsx-classname-namespace': 0,

// eslint 6.x migration
'react-hooks/rules-of-hooks': 1,
Expand Down
4 changes: 2 additions & 2 deletions projects/packages/forms/src/blocks/contact-form/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
InnerBlocks,
InspectorControls,
URLInput,
__experimentalBlockVariationPicker as BlockVariationPicker, // eslint-disable-line wpcalypso/no-unsafe-wp-apis
__experimentalBlockPatternSetup as BlockPatternSetup, // eslint-disable-line wpcalypso/no-unsafe-wp-apis
__experimentalBlockVariationPicker as BlockVariationPicker, // eslint-disable-line @wordpress/no-unsafe-wp-apis
__experimentalBlockPatternSetup as BlockPatternSetup, // eslint-disable-line @wordpress/no-unsafe-wp-apis
} from '@wordpress/block-editor';
import { createBlock, registerBlockVariation } from '@wordpress/blocks';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin Bar: Adjust wpcom logo size on mobile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Replace eslint disable of `wpcalypso/no-unsafe-wp-apis` with `@wordpress/no-unsafe-wp-apis`. No change to functionality.


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

Always use house icon for site name in admin-bar.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line wpcalypso/no-unsafe-wp-apis
import { __unstableInserterMenuExtension as InserterMenuExtension } from '@wordpress/block-editor';
import { __unstableInserterMenuExtension as InserterMenuExtension } from '@wordpress/block-editor'; // eslint-disable-line @wordpress/no-unsafe-wp-apis
import { useState } from '@wordpress/element';
import { registerPlugin } from '@wordpress/plugins';
import { debounce } from 'lodash';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
top: 2px;

@media (max-width: 782px) {
width: 36px;
height: 36px;
margin: 0 8px;
width: 32px;
height: 32px;
margin: 0 10px;
mask-size: cover;
top: 5px;
top: 7px;
}
}

Expand Down Expand Up @@ -100,7 +100,7 @@
float: none;
position: absolute;
right: 0;

@media (max-width: 782px) {
#wp-admin-bar-help-center {
display: block !important;
Expand All @@ -115,18 +115,18 @@
}
}
}

#wp-admin-bar-notes {
display: block !important;
width: 52px !important;
.ab-item {
justify-content: center;

.noticon-bell {
width: 36px;
height: 46px;
top: 0;

&:before {
background-position-y: bottom;
background-position-x: center;
Expand All @@ -137,7 +137,7 @@
}
}
}

#wpnt-notes-panel2 {
top: 46px;
}
Expand All @@ -146,4 +146,9 @@
}
}


/**
* Always show the House icon by the site name.
*/
#wpadminbar #wp-admin-bar-site-name>.ab-item:before {
content: "\f102" !important;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { useBlockProps } from '@wordpress/block-editor';
import { Button, DateTimePicker, Dropdown, Placeholder } from '@wordpress/components';
import { useInstanceId } from '@wordpress/compose';
// eslint-disable-next-line wpcalypso/no-unsafe-wp-apis
import { dateI18n, __experimentalGetSettings } from '@wordpress/date';
import { dateI18n, __experimentalGetSettings } from '@wordpress/date'; // eslint-disable-line @wordpress/no-unsafe-wp-apis
import { __ } from '@wordpress/i18n';
import clsx from 'clsx';
import moment from 'moment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
useBreakpointMatch,
ActionButton,
} from '@automattic/jetpack-components';
import { useExperiment } from '@automattic/jetpack-explat';
import clsx from 'clsx';
import { useContext, useEffect, useLayoutEffect, useState } from 'react';
/*
Expand Down Expand Up @@ -73,6 +74,7 @@ const GlobalNotice = ( { message, title, options } ) => {
* @returns {object} The MyJetpackScreen component.
*/
export default function MyJetpackScreen() {
useExperiment( 'explat_test_jetpack_implementation_aa_test' );
useNotificationWatcher();
const { redBubbleAlerts } = getMyJetpackWindowInitialState();
const { jetpackManage = {}, adminUrl } = getMyJetpackWindowInitialState();
Expand Down
Loading

0 comments on commit 4d6814a

Please sign in to comment.