INN / umbrella-currentorg

umbrella repository for current.org
https://current.org
GNU General Public License v2.0
0 stars 1 forks source link

137 filtering hs #146

Closed benlk closed 4 years ago

benlk commented 4 years ago

Changes

This pull request implements the following portion of https://github.com/INN/umbrella-currentorg/issues/137#issuecomment-639686424:

It also:

Screen Shot 2020-06-05 at 18 23 41

Why

For https://github.com/INN/umbrella-currentorg/issues/137

Testing/Questions

Features that this PR affects:

Questions that need to be answered before merging:

Steps to test this PR:

  1. check that the form submits when the select's value changes
  2. Check that the form submits when the <details> closes, only if the checkboxes checked have changed.
    • uncheck and check the same box: should not submit
    • check a new box: should submit
    • uncheck a checked box: should submit
  3. check that if three checkboxes are checked, other checkboxes in that dropdown are disabled:
    • on page load, with three checked
    • after checking three
benlk commented 4 years ago

This is now :deployed: to staging and ready for review.

benlk commented 4 years ago
joshdarby commented 4 years ago

figure out what's causing timeouts

I think the problem here happens when there are no posts found for the specific query.

For example: http://staging.current.flywheelsites.com/local-projects/?projects-search=&tax_input%5Bproject-org-type%5D%5B%5D=&tax_input%5Bproject-category%5D%5B%5D=6996&tax_input%5Bproject-category%5D%5B%5D=6997 works and there are 36 results found.

The issue is happening when 0 results are found and the projects-single-held.php file is trying to be loaded because it assumes that $query->the_post is not empty.

Putting the include() function for the holder file here inside of a if ( $query->have_posts() ) conditional fixes the issue. https://github.com/INN/umbrella-currentorg/blob/c7f89c02b1c1dee47474494bae43f56bb7f40d05/wp-content/themes/currentorg/partials/projects-base.php#L70

joshdarby commented 4 years ago

Solution for the above committed in https://github.com/INN/umbrella-currentorg/pull/146/commits/0ce254f71985d91667702f6e3b8eb2d1b17425d5

benlk commented 4 years ago

Desktop: Screen Shot 2020-06-08 at 13 57 38 Screen Shot 2020-06-08 at 13 57 44

Narrow desktop:

Screen Shot 2020-06-08 at 13 58 00

Phone: Screen Shot 2020-06-08 at 13 58 05 Screen Shot 2020-06-08 at 13 58 14 Screen Shot 2020-06-08 at 13 58 20

joshdarby commented 4 years ago

@benlk can we merge/close this since it's already on staging?