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

Always display query controls #497

Merged
merged 2 commits into from
Jun 4, 2020
Merged

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Resolves an unreported bug which causes part of "Display Settings" section to disappear.

How to test the changes in this Pull Request:

  1. On master,
  2. Insert or edit a Homepage Posts block, set the "Number of items" in "Display Settings" section of sidebar settings manually to 0, or just clear the input next to slider
  3. Observe the query controls disappearing, leaving only "Choose Specific Posts" control in the "Display Settings" section
  4. Switch to this branch and rebuild
  5. Redo step 2, observe that no part of settings UI disappears

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 ran tests with your changes locally?

if "Number of items" was set to 0 or empty, the query controls were not rendered
@jeffersonrabb
Copy link
Contributor

Noting this is probably identical to this Carousel issue/resolution: #479

Copy link
Contributor

@claudiulodro claudiulodro left a comment

Choose a reason for hiding this comment

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

Good catch. I agree this change is good. We should also follow Jeff's suggestion to not let people select a value of 0 for Posts to Show.

@adekbadek
Copy link
Member Author

adekbadek commented May 28, 2020

Good idea, I've added disallowing 0 posts in 4bf44e9

Copy link
Contributor

@claudiulodro claudiulodro left a comment

Choose a reason for hiding this comment

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

👍

@adekbadek adekbadek merged commit b956111 into master Jun 4, 2020
@adekbadek adekbadek deleted the fix/query-controls-disappearing branch June 4, 2020 09:15
matticbot pushed a commit that referenced this pull request Jun 9, 2020
## [1.7.1](v1.7.0...v1.7.1) (2020-06-09)

### Bug Fixes

* always display query controls; disallow choosing 0 posts ([#497](#497)) ([b956111](b956111))
* correct order of arguments in implodes ([0f45074](0f45074))
* don't use main wp_query when rendering homepage posts ([9c804f6](9c804f6))
* reset postdata after restoring wp_query ([d9d01a6](d9d01a6))
* **homepage-posts:** exclude specific posts from other blocks from query ([#500](#500)) ([31181a5](31181a5)), closes [#498](#498)
* make bottom margin styles less specific for easier overrides ([#483](#483)) ([93c3aff](93c3aff))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.7.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants