-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Attachment iframe modal #25184
Attachment iframe modal #25184
Conversation
Hi, thanks for this contribution! I found some issues with the Pull Request description:
Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much! About linked issuesPlease consider opening an issue before submitting a Pull Request:
(Note: this is an automated message, but answering it will reach a real human) |
This pull request seems to contain new translation strings. I have summarized them below to ease up review:
(Note: this is an automated message, but answering it will reach a real human) |
The POC is not over yet but here is a preview of what it looks like at the moment this comment is written: https://drive.google.com/file/d/1Ph2T8Zqw7QQYFYgBbGOz9_Zpg_xpLQt9/view I'd like first impressions of this? Though I already have a few improvements ideas:
(Edit)
|
So after its done, it quickly redirects to edit page and collects the info, then closes it. |
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.
Wording ✔️, thanks!
admin-dev/themes/new-theme/js/pages/product/edit/attachments-manager.js
Outdated
Show resolved
Hide resolved
src/Adapter/Attachment/QueryHandler/GetAttachmentInfoHandler.php
Outdated
Show resolved
Hide resolved
Okay, I finished the The component was designed to be easy to use, basically:
|
admin-dev/themes/new-theme/js/components/modal/form-iframe-modal.ts
Outdated
Show resolved
Hide resolved
Only 2 feedbacks for me:
|
src/PrestaShopBundle/Form/Admin/Sell/Product/Options/ProductAttachmentsType.php
Outdated
Show resolved
Hide resolved
src/PrestaShopBundle/Form/Admin/Sell/Product/Options/ProductAttachmentsType.php
Outdated
Show resolved
Hide resolved
@jolelievre, I just updated my comment to reproduce the first issue. Thanks! |
18aedf7
Hi @MatShir, We need your confirmation about this issue
Is it ok to accept or do we need to fix the issue? Thanks! |
This behavior is not supposed to happen. The creation won't part of the BO anymore. The creation page would be replaced by a popup. So If the behavior works fine while editing the product page, then I think this PR is ready :) |
Hi @jolelievre, After these modifications, the exception is not displayed anymore. Steps to reproduce the issue:
=> can be selected multiple times: NOK If we click save => it will be ok Ping @MatShir we need your confirmation, is it a bug? can we accept this issue? Thanks! |
@MatShir to complement Khouloud's comment indeed a file can be selected multiple times, but on save only one is associated without exception and so on refresh only one is visible But it's not an ideal behaviour so to avoid blocking this PR I suggest adding this bug into this issue #25735 which already contains some bug that needs to be fixed on the attachment modal Or we can open a dedicated issue I'd like to merge this PR quickly because it contains a few components that are needed for categories, and it also blocks the Pack and related products feature (so the bug could also be fixed along with related products) |
@khouloudbelguith Could you make a new issue ? If it is the only issue remaining, we are going to fix it later. This PR need to go forward. Thanks 🤗 |
I created the appropriate issue here #25831 |
Hi @jolelievre, Yes, it is ok ✔️
=> the file is well added in the BO > Catalog > files page
In the BO > Orders > Add new Order page:
Thanks! |
QA OK without required approvals !? |
1 similar comment
QA OK without required approvals !? |
IframeModal
which uses an URL as initial parameter and displays an Iframe inside a modal, the it will trigger a callback on each new page load (a spinner is displayed while loading)ConfirmModal
so it shouldn't break anything but it'd be safer to check a few different modals to be sure nothing has been brokenThis change is
Breaking Changes
PrestaShop\PrestaShop\Adapter\Attachment\AttachmentRepository
now has two parameters in its constructorAttachmentInformation
query result objects now expects (and contains) localized values for names, it also contains localized description and size AndgetType
was renamedgetMimeType
PrestaShop\PrestaShop\Core\Domain\Product\QueryResult\ProductForEditing
now expects (and contains) an array ofAttachmentInformation
instead of an array of attachment IDsAssociateProductAttachmentCommand
command andGetAttachmentInformationList
queryRemoveAllAssociatedProductAttachmentsCommand
andSetAssociatedProductAttachmentsCommand
into dedicated Attachment sub namespaceKnown issue
The form iframe component has a small integration bug, a dedicated issue was created for this #25735