Skip to content

Commit

Permalink
Merge pull request #2330 from 10up/develop
Browse files Browse the repository at this point in the history
Update trunk
  • Loading branch information
felipeelia authored Aug 26, 2021
2 parents 84b6ebd + 21e9c00 commit 62b33be
Show file tree
Hide file tree
Showing 104 changed files with 16,876 additions and 9,253 deletions.
7 changes: 1 addition & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@wordpress/default"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
"@10up/babel-preset-default"
]
}
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const defaultEslintrc = require('10up-toolkit/config/.eslintrc');

module.exports = {
...defaultEslintrc,
globals: {
jQuery: true,
}
};
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
/.browserslistrc export-ignore
/.editorconfig export-ignore
/.eslintignore export-ignore
/.eslintrc export-ignore
/.eslintrc.js export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.stylelintrc export-ignore
/CHANGELOG.md export-ignore
/CODE_OF_CONDUCT.md export-ignore
/composer.json export-ignore
Expand All @@ -33,5 +34,5 @@
/SECURITY.md export-ignore
/run-wpacceptance.sh export-ignore
/single-site.xml.dist export-ignore
/webpack.config.babel.js export-ignore
/webpack.config.js export-ignore
/wpacceptance.json export-ignore
4 changes: 2 additions & 2 deletions .github/hookdoc-tmpl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

ElasticPress, a fast and flexible search and query engine for WordPress, enables WordPress to find or “query” relevant content extremely fast through a variety of highly customizable features. WordPress out-of-the-box struggles to analyze content relevancy and can be very slow. ElasticPress supercharges your WordPress website making for happier users and administrators. The plugin even contains features for popular plugins.

**ElasticPress 3.0:** ElasticPress 3.0 contains major changes from 2.x including a rewrite of the feature registration API and PHP 5.4+ features. If you have problems upgrading, please create an issue.
**ElasticPress 3.0:** ElasticPress 3.0 contains major changes from 2.x including a rewrite of the feature registration API and PHP 5.4+ features. If you have problems upgrading, please create an issue. The minimum PHP version for ElasticPress 3.6.2 is 5.6.

**Please note:** master is the stable branch on GitHub.
**Please note:** currently, `master` is the stable branch on GitHub. The upcoming ElasticPress 3.7.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will build a stable release version including built assets into a `stable` branch, and will include a build script should you want to build assets from a branch.

**Upgrade Notice:** Versions 1.6.1, 1.6.2, 1.7, 1.8, 2.1, 2.1.2, 2.2, 2.7, 3.0, 3.1, and 3.3 require re-syncing.

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: PHP Compatibility

env:
COMPOSER_VERSION: "1"
COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache"

on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- develop
- master
pull_request:
branches:
- develop

jobs:
php_compatibility:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: prestissimo, composer:v1

- name: Install dependencies
run: composer install

- name: Check PHP Compatibility
run: ./vendor/bin/phpcs -p elasticpress.php includes --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion ${{ matrix.php }}
11 changes: 11 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": [
"@10up/stylelint-config"
],
"rules": {
"sh-waqar/declaration-use-variable": null,
"font-family-no-missing-generic-family-keyword": null,
"declaration-property-unit-allowed-list": null
}

}
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,45 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased]

## [3.6.2] - 2021-08-26

**Note that the upcoming ElasticPress 3.7.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will build a stable release version including built assets into a `stable` branch, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to either `stable` or `trunk` depending on whether you require built assets or not.

This version bumps official PHP support from 5.3+ to 5.6+. Minimum PHP version for ElasticPress 3.7.0 will be 7.0+.

### Added
- GitHub Action to test compatibility with different PHP versions. Props [@felipeelia](https://github.com/felipeelia) via [#2303](https://github.com/10up/ElasticPress/pull/2303).
- Validate mapping currently in index against expected version. Props [@tott](https://github.com/tott), [@tlovett1](https://github.com/tlovett1), [@asharirfan](https://github.com/asharirfan), [@oscarssanchez](https://github.com/oscarssanchez), and [@felipeelia](https://github.com/felipeelia) via [#1472](https://github.com/10up/ElasticPress/pull/1472).
- `ep_default_analyzer_filters` filter to adjust default analyzer filters. Props [@pschoffer](https://github.com/pschoffer) and [@felipeelia](https://github.com/felipeelia) via [#2282](https://github.com/10up/ElasticPress/pull/2282).
- `title` and `aria-labels` attributes to each icon hyperlink in the header toolbar. Props [@claytoncollie](https://github.com/claytoncollie) and [@felipeelia](https://github.com/felipeelia) via [#2304](https://github.com/10up/ElasticPress/pull/2304).
- `Utils\is_integrated_request()` function to centralize checks for admin, AJAX, and REST API requests. Props [@JakePT](https://github.com/JakePT), [@felipeelia](https://github.com/felipeelia), [@brandwaffle](https://github.com/brandwaffle), [@moritzlang](https://github.com/moritzlang), and [@lkraav](https://github.com/lkraav) via [#2267](https://github.com/10up/ElasticPress/pull/2267).

### Changed
- Use `10up-toolkit` to build assets. Props [@Rahmon](https://github.com/Rahmon), [@felipeelia](https://github.com/felipeelia), and [@nicholasio](https://github.com/nicholasio) via [#2279](https://github.com/10up/ElasticPress/pull/2279).
- Official PHP supported version bumped to 5.6. Props [@felipeelia](https://github.com/felipeelia) via [#2320](https://github.com/10up/ElasticPress/pull/2320).
- Lint React rules using `10up/eslint-config/react`. Props [@Rahmon](https://github.com/Rahmon) via [#2306](https://github.com/10up/ElasticPress/pull/2306).
- For ES 7.0+ mappings, change `edgeNGram` to `edge_ngram`. Props [@pschoffer](https://github.com/pschoffer) and [@rinatkhaziev](https://github.com/rinatkhaziev) via [#2315](https://github.com/10up/ElasticPress/pull/2315).

### Removed
- Remove duplicate category_name, cat and tag_id from ES query when tax_query set. Props [@rebeccahum](https://github.com/rebeccahum) and [@oscarssanchez](https://github.com/oscarssanchez) via [#2241](https://github.com/10up/ElasticPress/pull/2241).
- Remove unused `path` from `dynamic_templates`. Props [@pschoffer](https://github.com/pschoffer) via [#2315](https://github.com/10up/ElasticPress/pull/2315).

### Fixed
- Remove data from Elasticsearch on a multisite network when a site is archived, deleted or marked as spam. Props [@dustinrue](https://github.com/dustinrue) and [@felipeelia](https://github.com/felipeelia) via [#2284](https://github.com/10up/ElasticPress/pull/2284).
- `stats` and `status` commands in a multisite scenario. Props [@Rahmon](https://github.com/Rahmon), [@felipeelia](https://github.com/felipeelia), and [@dustinrue](https://github.com/dustinrue) via [#2290](https://github.com/10up/ElasticPress/pull/2290).
- Multiple words synonyms. Props [@scooterlord](https://github.com/scooterlord), [@jonasstrandqvist](https://github.com/jonasstrandqvist), and [@felipeelia](https://github.com/felipeelia) via [#2287](https://github.com/10up/ElasticPress/pull/2287).
- Category slug used when doing cat Tax Query with ID. Props [@oscarssanchez](https://github.com/oscarssanchez) and [@karols0](https://github.com/karols0) via [#2322](https://github.com/10up/ElasticPress/pull/2322).
- Restore current blog when the_post triggers outside the loop in multisite environment and the whole network is searched if the first result is from another blog. Props [@gonzomir](https://github.com/gonzomir) and [@felipeelia](https://github.com/felipeelia) via [#2283](https://github.com/10up/ElasticPress/pull/2283).
- Prevents a post from being attempted to delete twice. Props [@pauarge](https://github.com/pauarge) via [#2314](https://github.com/10up/ElasticPress/pull/2314).
- Indexing button on Health screen. Props [@Rahmon](https://github.com/Rahmon) and [@oscarssanchez](https://github.com/oscarssanchez) via [#2312](https://github.com/10up/ElasticPress/pull/2312).
- WP Acceptance tests and Page Crashed errors. Props [@felipeelia](https://github.com/felipeelia) and [@jeffpaul](https://github.com/jeffpaul) via [#2281](https://github.com/10up/ElasticPress/pull/2281) and [#2313](https://github.com/10up/ElasticPress/pull/2313).
- Facets: Children of selected terms ordered by count. Props [@oscarssanchez](https://github.com/oscarssanchez), [@Rahmon](https://github.com/Rahmon), and [@felipeelia](https://github.com/felipeelia) via [#2288](https://github.com/10up/ElasticPress/pull/2288).

### Security
- Bumps `path-parse` from 1.0.6 to 1.0.7. Props [@dependabot](https://github.com/dependabot) via [#2302](https://github.com/10up/ElasticPress/pull/2302).

## [3.6.1] - 2021-07-15

**Note that the upcoming ElasticPress 3.7.0 release will remove built assets from the `develop` branch, will replace `master` with `trunk`, will build a stable release version including built assets into a `stable` branch, and will include a build script should you want to build assets from a branch.** As such, please plan to update any references you have from `master` to either `stable` or `trunk` depending on whether you require built assets or not.

This version requires a full reindex. The new `facet` field introduced in `3.6.0` requires a change in the mapping, otherwise, all content sync related to posts will silently fail. If you've upgraded to 3.6.0 and didn't resync your content yet (via Dashboard or with WP-CLI `wp elasticpress index --setup`) make sure to do so.
Expand Down Expand Up @@ -998,6 +1036,7 @@ See https://github.com/10up/ElasticPress/pulls?utf8=%E2%9C%93&q=is%3Apr+mileston
- Initial plugin release

[Unreleased]: https://github.com/10up/ElasticPress/compare/master...develop
[3.6.2]: https://github.com/10up/ElasticPress/compare/3.6.1...3.6.2
[3.6.1]: https://github.com/10up/ElasticPress/compare/3.6.0...3.6.1
[3.6.0]: https://github.com/10up/ElasticPress/compare/3.5.6...3.6.0
[3.5.6]: https://github.com/10up/ElasticPress/compare/3.5.5...3.5.6
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> A fast and flexible search and query engine for WordPress.
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests Status](https://github.com/10up/ElasticPress/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/10up/ElasticPress) [![Release Version](https://img.shields.io/github/release/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.6%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests Status](https://github.com/10up/ElasticPress/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/10up/ElasticPress) [![Release Version](https://img.shields.io/github/release/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.8%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/ElasticPress.svg)](https://github.com/10up/ElasticPress/blob/develop/LICENSE.md)

**Please note:** master is the stable branch.

Expand All @@ -24,7 +24,7 @@ ElasticPress has an in depth documentation site. [Visit the docs ☞](http://10u

* [Elasticsearch](https://www.elastic.co) 5.0+ **ElasticSearch max version supported: 7.9**
* [WordPress](http://wordpress.org) 3.7.1+
* [PHP](https://php.net/) 5.4+
* [PHP](https://php.net/) 5.6+

## React Components

Expand Down
20 changes: 12 additions & 8 deletions assets/css/autosuggest.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,31 @@
position: relative;

& .ep-autosuggest {
background: #fff;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
display: none;
background: white;
position: absolute;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba( 0, 0, 0, .2 );

width: 100%;
z-index: 200;

& > ul {
margin: 0 !important;
list-style: none;
margin: 0 !important;

& > li {
font-family: sans-serif;

& > a.autosuggest-link {
display: block;
color: #000;
padding: 2px 10px;
cursor: pointer;
display: block;
padding: 2px 10px;

&:hover,
&:active {
background-color: #EEEEEE;
background-color: #eee;
text-decoration: none;
}
}
Expand All @@ -31,7 +35,7 @@
}

& .selected {
background-color: #EEE;
background-color: #eee;
text-decoration: none;
}
}
Loading

0 comments on commit 62b33be

Please sign in to comment.