-
Notifications
You must be signed in to change notification settings - Fork 91
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
Introduce used in filter #1531
Introduce used in filter #1531
Conversation
…lery to allow the user to filter by the area where the images are used in: pages, categories, blocks, products
@magento run all tests |
@@ -85,6 +85,7 @@ public function execute(int $assetId): array | |||
'image_url' => $this->getUrl($asset->getPath()), | |||
'title' => $asset->getTitle(), | |||
'path' => $asset->getPath(), | |||
'description' => $asset->getDescription(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this PR contains the changes from #1512. Can you please ensure each PR contains only the changes related to the task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @gregbalonzo ! The implementation looks good, however, it should be moved to the MediaGalleryUi module
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\AdobeStockImageAdminUi\Model\SearchCriteria\CollectionProcessor\FilterProcessor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the files to MediaGalleryUi
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried moving the file AdobeStockImageAdminUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/EntityType.php
to
stock-integration/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/
i cannot get to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that all the implementation should be moved to MediaGalleryUi module, not just a single file (for sure, the namespaces should be changed accordingly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi sergii, done moving the implementation MediaGalleryUi module
@magento run all tests |
*/ | ||
public function toOptionArray(): array | ||
{ | ||
return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we inject this array here via di.xml? That will allow other extensions to easily add their entity to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gregbalonzo , thank you for your contribution. Please, check my suggestions below.
MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/EntityType.php
Show resolved
Hide resolved
MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/EntityType.php
Show resolved
Hide resolved
MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/EntityType.php
Outdated
Show resolved
Hide resolved
…Processor/EntityType.php Co-authored-by: Alexander Shkurko <[email protected]>
Co-authored-by: Gabriel da Gama <[email protected]>
Co-authored-by: Gabriel da Gama <[email protected]>
…ave a description, eject into array filter name
@magento run all tests |
Hello @gregbalonzo ! Thank you for the provided changes. Please, fix the conflict at the |
@magento run all tests |
This reverts commit 711765e.
…be-stock-integration into introduce-used-in-filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ QA Failed
Please observe the following points from less important to more important:
-
Since plural is used with Blocks, Categories, Products, please use plural for Pages also
-
there is a frontend issue when applying filters NOT from Standalone Media Gallery, for example from Catalog - Categories
-
if there is an image which is used in two entities, for example in Product and in Category, and both filters are applied - an Item (Magento\Framework\View\Element\UiComponent\DataProvider\Document) with the same ID "1" already exists. text is displayed
works properly when only one of the filters is applied
Test on the Cucumber Studio - https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4930844 |
@magento run all tests |
@magento run all tests |
✔️ QA Passed |
Hi @gregbalonzo, thank you for your contribution! |
Description (*)
Add Used In filter to the media gallery to allow the user to filter by the area where the images are used in: pages, categories, blocks, products.
Fixed Issues (if relevant)
Manual testing scenarios (*)
in order to test the search must put images on these area pages, categories, blocks, products.