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
Remove empty category blocks in module manager #29421
Remove empty category blocks in module manager #29421
Conversation
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.
src/PrestaShopBundle/Resources/views/Admin/Module/Includes/grid_manage_empty.html.twig
This file has been modified recently with this hook:
{{ renderhook('displayEmptyModuleCategoryExtraMessage', {'category_name': category.name}) }}
To meet requirements from the SMB edition. @MatShir approved it
I think it looks better without this information, but it would be good to align on this topic.
@kpodemski I don't know? there was ps_mbo for ads before? not here? |
@okom3pom I don't know. I just want to avoid going back and forth with changes that were previously (not that long ago) approved :D |
The issue was approved, I make sense to add content for marketplace module in the module manager #28317. UX could be enhanced ofc. It looks a good option to hide the block when nobody is hooked to it, only if we don't remove the hooks. Could you confirm @eternoendless? |
Waiting for @eternoendless feedback: this PR currently disables the use of the hook mentioned by @kpodemski . So it seems we don't want to merge it like this. |
{% block catalog_category_empty %}
{% set hookData = renderhook('displayEmptyModuleCategoryExtraMessage', {'category_name': category.name}) %}
{% if hookData is not empty %}
<div class="modules-list module-list-empty" data-name="{{ category.refMenu }}">
<p>{{ 'You do not have module in « %categoryName% ».' | trans({'%categoryName%': category.name}, 'Admin.Modules.Feature') }}</p>
{{ hookData }}
</div>
{% endif %}
{% endblock %} |
c2f506f
980fa75
to
c2f506f
Compare
Fixed using @Hlavtox's suggestion 👍 I had to move the category name inside the block though. I also removed the wording, which not only had spelling and punctuation errors, but I also found it useless if you're adding content... |
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.
🍬
hello @eternoendless, Thank you for the PR. Thanks in advance |
I've just created an issue to unblock this PR: Could you add proper labels to it? because it has already been accepted, |
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.
Hello @eternoendless ,
I checked this PR and I the issue is well fixed ✔️
But the automated tests are failed in BO:modules
test.
https://github.com/MhiriFaten/testing_pr/actions/runs/3443969574/jobs/5748649304
ping @PrestaShop/qa-automation Could you please check it ?
Thank you !
It's seems that the test should be updated, we will take a look. |
Hello @eternoendless @MhiriFaten @boubkerbribri Thank you for the PR and the tests ! The 2 PRs should be merged together :) Thank you! |
QA approved, well done! Message to the maintainers: do not forget to milestone it before the merge. |
@FabienPapet don't forget to add the milestone ;) |
Adapt automated tests to the fix of #29421
And please don't forget if there is a PR that's related (here was to fix UI tests) |
Before:
After: