This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Add Stock Status setting to Product Query Block#7397
Merged
sunyatasattva merged 9 commits intotrunkfrom Oct 27, 2022
Merged
Conversation
Creates a new Tools Panel called “Product filters” where we can neatly organize our product specific settings. Eventually, this panel could be merged with the core “Filters” panel; however, at the time of this commit, this is impossible (see WordPress/gutenberg#43684 for a PoC). Also moved the “On Sale” setting under this newly created panel.
Tools Panels come with a “Reset All” functionality, that's supposed to return all the settings to their original state. In our case, things are a bit more complicated, as the original state is dependant on the current variation, so it can't be hard-coded like it is on the core block.
Contributor
|
The release ZIP for this PR is accessible via: |
Contributor
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the |
Contributor
|
Size Change: +434 B (0%) Total Size: 992 kB
ℹ️ View Unchanged
|
Contributor
|
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
danielwrobert
approved these changes
Oct 27, 2022
Contributor
danielwrobert
left a comment
There was a problem hiding this comment.
LGTM!
The code looks good and I went through the test plan and confirmed everything tests as described. Nice work!
🚀
senadir
pushed a commit
to senadir/woocommerce-blocks
that referenced
this pull request
Nov 12, 2022
* Add Stock Status to Product Query block filters Creates a new Tools Panel called “Product filters” where we can neatly organize our product specific settings. Eventually, this panel could be merged with the core “Filters” panel; however, at the time of this commit, this is impossible (see WordPress/gutenberg#43684 for a PoC). Also moved the “On Sale” setting under this newly created panel. * Add `resetAll` callback for the new Tools Panel Tools Panels come with a “Reset All” functionality, that's supposed to return all the settings to their original state. In our case, things are a bit more complicated, as the original state is dependant on the current variation, so it can't be hard-coded like it is on the core block.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR creates a new Tools Panel called “Product filters” where we can neatly organize our product specific settings. Eventually, this panel could be merged with the core “Filters” panel; however, at the time of this commit, this is impossible (see WordPress/gutenberg#43684 for a PoC). On this new section, we add a new setting to filter by product Stock Status.
This also moves the “On Sale” setting under this newly created panel.
Closes #7218
Accessibility
Video demo
7218-demo.mov
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility