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
Modify adresses listing in Customer page to use Grid instead #20261
Modify adresses listing in Customer page to use Grid instead #20261
Conversation
src/PrestaShopBundle/Resources/views/Admin/Common/Grid/grid_panel.html.twig
Outdated
Show resolved
Hide resolved
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.
One question ;)
1955a39
to
209a403
Compare
|
Just one more thing (maybe a regression) : |
the bad news is the template is overriden by the linklist module https://github.com/PrestaShop/ps_linklist/blob/master/views/PrestaShop/Admin/Common/Grid/grid_panel.html.twig |
cbcf696
to
209a403
Compare
For @PrestaShop/qa-automation @PrestaShop/qa-functional |
*/ | ||
protected function getName() | ||
{ | ||
return null; |
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 don't think the name should be null
? 🤔
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 think this was put there in order to avoid printing the grid name (see modifications in grid_panel.html.twig), in order to avoid rendering duplicate "Adresses" string
However I agree the PHP class (which contains the data) should, as much as possible, not be mixed with the template (which defines how it's rendered)
I would rather suggest
- provide an option into Grid to disable the "title" name inside any Grid
- override locally the grid to have this specific grid different from others
The idea being to keep into the View (as in MVC) whatever rendering logic we put, and keep the Grid (the Model) "consistent"
@sowbiba I think you can update |
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.
@sowbiba The PR is valid for with the exception of the grid name. Following @atomiix suggestion I think we should keep the data model consistent following It's just a view principle. I provided some suggestions about how to achieve that (naturally you can also suggest/implement another solution if you find something more suitable)
Do you have time to handle this small change ? Else I can do it
209a403
to
0851849
Compare
src/PrestaShopBundle/Resources/views/Admin/Common/Grid/grid_panel.html.twig
Show resolved
Hide resolved
src/PrestaShopBundle/Resources/views/Admin/Common/Grid/grid_panel.html.twig
Show resolved
Hide resolved
Code is valid (and approved) but sadly we got git conflicts 😞 |
f6389b6
910f836
to
f6389b6
Compare
cs fixer is not happy, again :p |
b2ab886
b2ab886
to
d4d9dd4
Compare
768d06a
to
9ddb3b6
Compare
LGTM Thanks @sowbiba !! |
Customers > View > Addresses.
This may have impact on automated tests @PrestaShop/qa-automation
This change is