This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
Add/11823 hide filters per collection #12122
Closed
Closed
Conversation
This file contains 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
…play the placeholer
1. Corrected a typographical error in the `README.md` file, changing "registred" to "registered". 2. Updated the instruction text presented in the `product-collection-placeholder.tsx` file to offer clearer guidance for users.
- Updated the New Arrivals collection's default attributes to refine the block's appearance and content structure: - Reduced the default number of columns from 5 to 3 - Set the default number of items per page to 9 - Adjusted the collection attribute to reference the collection name dynamically - Replaced the hardcoded inner blocks template with a more dynamic structure, introducing a welcoming message and centralized product template usage - Refactored constants.ts to create distinct inner block templates for product, pagination, and no-results scenarios, enhancing reusability across different collections and improving code readability with descriptive comments Note: The changes aim to streamline the New Arrivals collection setup and facilitate maintainability through a more dynamic and structured approach to inner block templates.
…onentProps and update props usage - Renamed the `QueryEditComponentProps` type to `ProductCollectionEditComponentProps` to better match the Product Collection block context. Updated all occurrences in various files to maintain consistency. - Changed `openPatternSelectionModalOpen` prop to `openPatternSelectionModal` to correct the typo and make the naming more intuitive. Updated its usage in different files accordingly.
…mments - Renamed `QueryPlaceholder` component to `ProductCollectionPlaceholder` to better describe the component in the context of the Product Collection block. - Adjusted the import statements to group WordPress dependencies together and highlighted a TypeScript expectation error regarding missing Gutenberg types with `@ts-expect-error`.
This commit introduces several improvements and refactors to the `product-collection` block: - Utilized `block.json` for defining the block name in various files to centralize the block's configuration, making the codebase easier to maintain. - Moved and renamed `PatternSelectionModal.tsx` file to streamline the file structure and reflect its usage accurately. - Refactored the `PatternSelectionModal.tsx` file to: - Enhance type definitions and deal with missing TypeScript definitions using `@ts-expect-error`. - Update the import paths due to file relocations. - Streamline function names and parameters for better readability and understanding. - Change the modal title and category to reflect that users are choosing a "collection" rather than a "pattern". - Improved `PatternSelectionModal` to use `block.json` name and category properties, promoting maintainability and adherence to DRY principle. - Refactored `PatternSelectionModal` functions to construct the block query and apply it to patterns more robustly. - Updated `product-collection-placeholder.tsx` to use block name from `block.json`. - In `pattern-chooser-toolbar.tsx`, updated button label to indicate "Choose collection" instead of "Choose pattern" to maintain consistency with other changes. - Removed redundant filter addition in `inspector-controls/index.tsx`.
1. Changes the title in the pattern selection modal from 'Choose a pattern' to 'Choose a collection'. 2. Updates the button text in the product collection placeholder from 'Add default Product Collection' to 'Use default collection'. These changes aim to provide clearer instruction and terminology to the user.
…23-hide-filters-per-collection
…23-hide-filters-per-collection
Thank you for your interest in contributing to WooCommerce! WooCommerce Blocks has been merged into the WooCommerce Monorepo. From now on, please open any issues or pull requests in the woocommerce/woocommerce repository. |
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
assets/js/blocks/product-collection/edit/product-collection-content.tsx
|
Size Change: +2.62 kB (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
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.
What
Fixes #
Why
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Screenshots or screencast
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog