Skip to content

Commit

Permalink
Merge branch 'master' into improve/add-more-context-to-api-fetch-error
Browse files Browse the repository at this point in the history
* master:
  Widget Visibility: fix undefined property ref (#20967)
  Carousel: update prev/next nav button colors (#20940)
  E2E tests: mention users in Slack based on report name and branch name (#20964)
  Search: fix search admin page wrapping issue for ultra wide screens (#20962)
  Instant Search customization: use sentence case consistently (#20931)
  RP: Use all args for the filter (#20953)
  renovate: Fix config (#20952)
  Backport Sync and Heartbeat Changelog from Release (#20950)
  Update renovate config (#20917)
  Sync: Defensive coding against E_NOTICE (#20921)
  Carousel: Fix cursor css selector (#20927)
  Search: Improve style specificity for result highlights in Customberg (#20945)
  Contact Form: add filter to allow customizing email headers. (#20912)
  Blocks: fix HTML markup of buttons added to our blocks. (#20936)
  • Loading branch information
davidlonjon committed Sep 7, 2021
2 parents ffff2c4 + 9e56f4b commit df5cff0
Show file tree
Hide file tree
Showing 32 changed files with 150 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/files/renovate-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fi

# Update deps and lock files.
echo "::group::Updating dependencies on changed packages"
tools/check-intra-monorepo-deps.sh -uv
tools/check-intra-monorepo-deps.sh -uav
echo "::endgroup::"

# Create and push the commit.
Expand Down
16 changes: 11 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
"extends": [ "config:base" ],
"labels": [ "[Type] Janitorial", "[Status] Needs Review" ],
"prHourlyLimit": 1,
"supportPolicy": [ "lts_latest" ],
"timezone": "UTC",
"schedule": [ "before 3am on the first day of the month" ],
"updateNotScheduled": false,
"gitIgnoredAuthors": [ "[email protected]" ],
"ignoreDeps": [ "mockery/mockery", "php-mock/php-mock", "phpunit/phpunit" ],
"packageRules": [
{
"groupName": "Monorepo packages",
Expand Down Expand Up @@ -53,7 +51,7 @@
"enabled": false
},
{
"extends": "monorepo:wordpress",
"extends": [ "monorepo:wordpress" ],
"separateMajorMinor": false,
"prPriority": 1
},
Expand All @@ -62,8 +60,12 @@
"matchDepTypes": [ "monorepo:wordpress", "monorepo:react" ]
},
{
"groupName": "Eslint and plugins",
"matchPackagePatterns": [ "^eslint$", "^eslint-plugin-", "^eslint-config-" ]
"extends": [ "packages:eslint" ],
"groupName": "Eslint packages"
},
{
"extends": [ "packages:jsUnitTest" ],
"groupName": "JS unit testing packages"
},
{
"matchPaths": [ "packages/codesniffer/composer.json" ],
Expand All @@ -85,6 +87,10 @@
"labels": [ "Search", "Instant Search" ]
}
],
"lockFileMaintenance": {
"enabled": true,
"schedule": [ "before 3:00 am on Monday on the 7th through 13th day of the month" ]
},
"dependencyDashboard": true,
"dependencyDashboardTitle": "Renovate Dependency Updates",
"dependencyDashboardLabels": [ "Primary Issue", "[Type] Janitorial" ]
Expand Down
4 changes: 4 additions & 0 deletions projects/packages/heartbeat/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ 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).

## [1.3.10] - 2021-09-03
- Clean up doc blocks.

## [1.3.9] - 2021-08-30
### Changed
- Updated versions in annotations
Expand Down Expand Up @@ -72,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use new heartbeat package
- Creates the Jetpack Heartbeat package

[1.3.10]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.9...v1.3.10
[1.3.9]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.8...v1.3.9
[1.3.8]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.7...v1.3.8
[1.3.7]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.6...v1.3.7
Expand Down
5 changes: 0 additions & 5 deletions projects/packages/heartbeat/changelog/fix-typo-heartbeat

This file was deleted.

6 changes: 6 additions & 0 deletions projects/packages/sync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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).

## [1.26.1] - 2021-09-03
### Fixed
- Add better checks if the WooCommerce tables should be enabled for checksum/fix.
- Prevent PHP notices on queue_pull if all args are not set.

## [1.26.0] - 2021-08-30
### Added
- Add support for WooCommerce table to the checksum/fix process.
Expand Down Expand Up @@ -462,6 +467,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages: Move sync to a classmapped package

[1.26.1]: https://github.com/Automattic/jetpack-sync/compare/v1.26.0...v1.26.1
[1.26.0]: https://github.com/Automattic/jetpack-sync/compare/v1.25.0...v1.26.0
[1.25.0]: https://github.com/Automattic/jetpack-sync/compare/v1.24.2...v1.25.0
[1.24.2]: https://github.com/Automattic/jetpack-sync/compare/v1.24.1...v1.24.2
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion projects/packages/sync/src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '1.26.1-alpha';
const PACKAGE_VERSION = '1.26.1';

const PACKAGE_SLUG = 'sync';

Expand Down
8 changes: 5 additions & 3 deletions projects/packages/sync/src/class-rest-sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function queue_pull( $queue_name, $number_of_items, $args ) {
// try to give ourselves as much time as possible.
set_time_limit( 0 );

if ( $args['pop'] ) {
if ( ! empty( $args['pop'] ) ) {
$buffer = new Queue_Buffer( 'pop', $queue->pop( $number_of_items ) );
} else {
// let's delete the checkin state.
Expand All @@ -62,15 +62,17 @@ public function queue_pull( $queue_name, $number_of_items, $args ) {
return new WP_Error( 'buffer_non-object', 'Buffer is not an object', 400 );
}

$encode = isset( $args['encode'] ) ? $args['encode'] : true;

Settings::set_is_syncing( true );
list( $items_to_send, $skipped_items_ids ) = $sender->get_items_to_send( $buffer, $args['encode'] );
list( $items_to_send, $skipped_items_ids ) = $sender->get_items_to_send( $buffer, $encode );
Settings::set_is_syncing( false );

return array(
'buffer_id' => $buffer->id,
'items' => $items_to_send,
'skipped_items' => $skipped_items_ids,
'codec' => $args['encode'] ? $sender->get_codec()->name() : null,
'codec' => $encode ? $sender->get_codec()->name() : null,
'sent_timestamp' => time(),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
flex-flow: column nowrap;
width: 100%;
margin: 0 auto;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

Contact Form: add filter to allow customizing email headers.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

E2E tests: support user mentions in Slack based on report name and branch name
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-button-block-markup
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Blocks: fix HTML markup of buttons added to our blocks.
5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/fix-customberg-case
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: bugfix
Comment: Instant Search customization: use sentence case consistently


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

Search: Improve style specificity for result highlights in Customberg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Search: fix wrapping issue on super wide screens
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-widget-vis-php-notice
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Widget Visibility: fix undefined property reference.
5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/update-carousel-nav-colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: correct load order of Swiper/JP CSS.


5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/update-carousel_css_fix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: No entry needed because this fixes and issue in a previous PR.


5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/update-title-filter
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Resolves a fatal that is in 10.1 beta, no need for a separate changelog item.


2 changes: 1 addition & 1 deletion projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class Jetpack {
* When making changes to that list, you must also update concat_list in tools/builder/frontend-css.js.
*/
public $concatenated_style_handles = array(
'jetpack-carousel',
'jetpack-carousel-swiper-css',
'jetpack-carousel',
'grunion.css',
'the-neverending-homepage',
'jetpack_likes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function render_block( $attributes, $content ) {
: '<' . $element . $button_attributes . '>' . $text . '</' . $element . '>';

// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
return '<div "' . $wrapper_attributes . '">' . $button . '</div>';
return '<div' . $wrapper_attributes . '>' . $button . '</div>';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
/* end of temporary fix */

[data-carousel-extra]:not( .jp-carousel-wrap ) img, img + figcaption {
[data-carousel-extra]:not( .jp-carousel-wrap ) img, [data-carousel-extra]:not( .jp-carousel-wrap ) img + figcaption {
cursor: pointer;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2886,6 +2886,26 @@ function process_submission() {
$headers = 'From: ' . $comment_author . ' <' . $from_email_addr . ">\r\n" .
'Reply-To: ' . $comment_author . ' <' . $reply_to_addr . ">\r\n";

/**
* Allow customizing the email headers.
*
* @module contact-form
*
* @since 10.2.0
*
* @param string|array $headers Email headers.
* @param string $comment_author Name of the author of the submitted feedback, if provided in form.
* @param string $reply_to_addr Email of the author of the submitted feedback, if provided in form.
* @param string|array $to Array of valid email addresses, or single email address, where the form is sent.
*/
$headers = apply_filters(
'jetpack_contact_form_email_headers',
$headers,
$comment_author,
$reply_to_addr,
$to
);

$all_values['email_marketing_consent'] = $email_marketing_consent;

// Build feedback reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ protected function _action_frontend_init_ajax( array $excludes ) {
foreach ( array_merge( $with_post_thumbnails, $no_post_thumbnails ) as $index => $real_post ) {
$related_posts[ $index ]['id'] = $real_post->ID;
$related_posts[ $index ]['url'] = esc_url( get_permalink( $real_post ) );
$related_posts[ $index ]['title'] = $this->_to_utf8( $this->get_title( $real_post->post_title, $real_post->post_content ) );
$related_posts[ $index ]['title'] = $this->_to_utf8( $this->get_title( $real_post->post_title, $real_post->post_content, $real_post->ID ) );
$related_posts[ $index ]['date'] = get_the_date( '', $real_post );
$related_posts[ $index ]['excerpt'] = html_entity_decode( $this->_to_utf8( $this->_get_excerpt( $real_post->post_excerpt, $real_post->post_content ) ), ENT_QUOTES, 'UTF-8' );
$related_posts[ $index ]['img'] = $this->_generate_related_post_image_params( $real_post->ID );
Expand Down Expand Up @@ -1192,7 +1192,7 @@ public function get_related_post_data_for_post( $post_id, $position, $origin ) {
'origin' => $origin,
'position' => $position,
),
'title' => $this->_to_utf8( $this->get_title( $post->post_title, $post->post_content ) ),
'title' => $this->_to_utf8( $this->get_title( $post->post_title, $post->post_content, $post->ID ) ),
'date' => get_the_date( '', $post->ID ),
'format' => get_post_format( $post->ID ),
'excerpt' => html_entity_decode( $this->_to_utf8( $this->_get_excerpt( $post->post_excerpt, $post->post_content ) ), ENT_QUOTES, 'UTF-8' ),
Expand Down Expand Up @@ -1249,14 +1249,15 @@ public function get_related_post_data_for_post( $post_id, $position, $origin ) {
*
* @param string $post_title Post title.
* @param string $post_content Post content.
* @param int $post_id Post ID.
*
* @return string
*/
protected function get_title( $post_title, $post_content ) {
protected function get_title( $post_title, $post_content, $post_id ) {
if ( ! empty( $post_title ) ) {
return wp_strip_all_tags(
/** This filter is documented in core/src/wp-includes/post-template.php */
apply_filters( 'the_title', $post_title )
apply_filters( 'the_title', $post_title, $post_id )
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ColorControl( { disabled, value, onChange } ) {
return (
<div className="jp-search-configure-color-input components-base-control">
<ColorGradientControl
label={ __( 'Highlight for Search Terms', 'jetpack' ) }
label={ __( 'Highlight for search terms', 'jetpack' ) }
disabled={ disabled }
colorValue={ value }
colors={ colors }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function ExcludedPostTypesControl( {
return (
<div className="jp-search-configure-excluded-post-types-control components-base-control">
<div className="jp-search-configure-excluded-post-types-control__label">
{ __( 'Excluded Post Types', 'jetpack' ) }
{ __( 'Excluded post types', 'jetpack' ) }
</div>
{ isLastUnchecked && (
<Notice isDismissible={ false } status="info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function SidebarOptions() {
<ThemeControl disabled={ isDisabled } onChange={ setTheme } value={ theme } />
<RadioControl
className="jp-search-configure-result-format-radios"
label={ __( 'Result Format', 'jetpack' ) }
label={ __( 'Result format', 'jetpack' ) }
selected={ resultFormat }
options={ [
{ label: __( 'Minimal', 'jetpack' ), value: 'minimal' },
Expand All @@ -82,10 +82,10 @@ export default function SidebarOptions() {
<ColorControl disabled={ isDisabled } onChange={ setColor } value={ color } />
</PanelBody>

<PanelBody title={ __( 'Search Options', 'jetpack' ) } initialOpen={ true }>
<PanelBody title={ __( 'Search options', 'jetpack' ) } initialOpen={ true }>
<SelectControl
disabled={ isDisabled }
label={ __( 'Default Sort', 'jetpack' ) }
label={ __( 'Default sort', 'jetpack' ) }
value={ sort }
options={ [
{ label: __( 'Relevance (recommended)', 'jetpack' ), value: 'relevance' },
Expand All @@ -96,7 +96,7 @@ export default function SidebarOptions() {
/>
<SelectControl
disabled={ isDisabled }
label={ __( 'Overlay Trigger', 'jetpack' ) }
label={ __( 'Overlay trigger', 'jetpack' ) }
value={ trigger }
options={ [
{ label: __( 'Open when the user starts typing', 'jetpack' ), value: 'immediate' },
Expand All @@ -112,7 +112,7 @@ export default function SidebarOptions() {
/>
</PanelBody>

<PanelBody title={ __( 'Additional Settings', 'jetpack' ) } initialOpen={ true }>
<PanelBody title={ __( 'Additional settings', 'jetpack' ) } initialOpen={ true }>
<ToggleControl
checked={ sortEnabled }
disabled={ isDisabled }
Expand All @@ -122,7 +122,7 @@ export default function SidebarOptions() {
<ToggleControl
checked={ infiniteScroll }
disabled={ isDisabled }
label={ __( 'Enable Infinite Scroll', 'jetpack' ) }
label={ __( 'Enable infinite scroll', 'jetpack' ) }
onChange={ setInfiniteScroll }
/>
<ToggleControl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class SearchResults extends Component {
dangerouslySetInnerHTML={ {
__html: `
.jetpack-instant-search *::selection,
.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary mark {
.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary .jetpack-instant-search__search-result mark {
color: ${ textColor };
background-color: ${ highlightColor };
}
Expand Down
Loading

0 comments on commit df5cff0

Please sign in to comment.