Remove Instant Results' dependency on @wordpress/date and @wordpress/components #2774
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Replaces the implementation of SlotFill with a basic React portal for the active facets chips. This removes the dependency on
@wordpress/components
which is very large.Also replaces the use of
@wordpress/date
, which is also quite large, with the use ofDate.toLocaleDateString()
. This reduces the options for date formatting, but we weren't supporting that yet anyway.Closes #2768.
Verification Process
In Instant Results verify that the active facets can be seen and clicked to remove when filtering results. Also verify that the wp-components dependency is not loaded.
Also verify that the date on Post results is displayed correctly, and updates according to the site's language.
Checklist:
Changelog Entry
Changed - Removed Instant Results' dependency on @wordpress/components and @wordpress/date.
Credits
Props @JakePT