Skip to content

Conversation

@ObliviousHarmony
Copy link
Contributor

@ObliviousHarmony ObliviousHarmony commented Feb 19, 2021

All Submissions:

Changes proposed in this Pull Request:

Since the page selection dropdowns in the Advanced settings area are populated on load we can end up taking a very long time to load on shops that have lots of pages. This PR aims to replace the existing dropdown with search selects that will reduce the page load time by pulling the pages using AJAX.

Closes #27233.

How to test the changes in this Pull Request:

  1. Review WooCommerce > Settings > Advanced
  2. Ensure page dropdowns are searchable selects.
  3. Ensure you can clear the currently selected page.
  4. Ensure you can only select one page at a time.
  5. Ensure excludes are working correctly. For example cart page should not show checkout page as available. And checkout page should not show cart page as available.
  6. Ensure you see the page ID next to the page name.
  7. Ensure page dropdowns still save correctly
  8. Go to the frontend and ensure these pages are indeed set correctly by loading them.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Change - replace page setup dropdowns with AJAX powered search selects.

Since the page selection dropdowns in the Advanced settings area are
populated on load we can end up taking a very long time to load on
shops that have lots of pages. This commit adds page search support
to wooSelect and starts converting the pages to use it.
@ObliviousHarmony
Copy link
Contributor Author

Remaining

  • Populate with current selection
  • Support excludes correctly (there is nothing populating the data attribute)
  • Convert remaining page options

@github-actions
Copy link
Contributor

📦 Artifacts ready for download!

Base automatically changed from master to trunk February 25, 2021 22:18
@roykho roykho marked this pull request as ready for review March 22, 2021 21:24
@roykho roykho requested review from a team and jonathansadowski and removed request for a team March 22, 2021 21:25
@roykho roykho self-assigned this Mar 23, 2021
@roykho roykho added this to the 5.3.0 milestone Mar 23, 2021
Copy link
Contributor

@jonathansadowski jonathansadowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, and changes make sense. Thanks for finishing this up 👍

@jonathansadowski jonathansadowski merged commit 2e60d47 into trunk Mar 23, 2021
@jonathansadowski jonathansadowski deleted the fix/27233 branch March 23, 2021 16:46
@woocommercebot woocommercebot added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Mar 23, 2021
@tammullen tammullen added testing instructions added and removed release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Apr 20, 2021
@senadir
Copy link
Member

senadir commented Aug 3, 2022

Hey! Any reason woocommerce_shop_page_id wasn't given the same treatment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: add changelog Mark all PRs that have not had their changelog entries added. [auto]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High number of pages in WordPress can cause WooCommerce settings pages not to load

7 participants