Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Sync page with advanced options #3657

Merged
merged 9 commits into from
Sep 27, 2023
Merged

New Sync page with advanced options #3657

merged 9 commits into from
Sep 27, 2023

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented Sep 26, 2023

Description of the Change

Introduces a refreshed Sync page with an Advanced Options section for setting additional parameters for a sync, bringing some of the functionality from the WP CLI command to the UI.

elasticpress test_wp-admin_admin php_page=elasticpress-sync (1)

This PR includes a number things:

  • Updates the SyncProvider component to support additional arguments when syncing. Auto syncing and initial sync management have been removed so that they can be managed at the UI level.
  • Adds a SettingsScreenProvider component that sets a common layout for ElasticPress settings screens and provides a method for displaying toast/snackbar type notifications.
  • Adds a SyncSettingsProvider component for managing the state of selected sync settings across components.
  • Combines the separate Sync and Delete and Sync panels into a single panel with a checkbox to perform a Delete and Sync.
  • Adds the date and time to log messages.
  • Adds Clear log and Copy log to clipboard buttons.
  • Adds options for Indexables, Post Types, Object IDs, and an Offset.

The only regression against the current Sync page is that the previous sync status has been removed. The sync history will be added in a separate PR, now that #3647 has been merged.

This PR updates existing E2E tests for Syncing, but tests for new options will come separately.

Closes #3640

How to test the Change

  1. Visit ElasticPress > Sync.
  2. It should be possible to Start, Pause, Resume, and Stop a sync as before.
  3. Checking Delete all data and start fresh sync should delete all data and send mapping when syncing.
  4. The sync results and log should reflect the choices made in the Advanced Options section.

Changelog Entry

Changed - Combined the separate Sync and Delete and Sync panels into a single panel with a checkbox to perform a Delete and Sync.
Added - Added the date and time to log messages on the Sync Page.
Added - Added Clear log and Copy log to clipboard buttons to the Sync page.
Added - Added Advanced Options to the Sync page for setting Content Types, Post Types, Object IDs, and an Offset for a sync.

Credits

Props @JakePT @felipeelia Apurv Ray @brandwaffle @anjulahettige

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@JakePT JakePT marked this pull request as ready for review September 26, 2023 21:31
@JakePT JakePT linked an issue Sep 26, 2023 that may be closed by this pull request
1 task
@felipeelia felipeelia merged commit 24aa4a0 into 5.0.0 Sep 27, 2023
8 of 9 checks passed
@felipeelia felipeelia deleted the feature/sync-page-ui branch September 27, 2023 18:36
@felipeelia felipeelia added this to the 5.0.0 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to set sync parameters on the Sync page
2 participants