-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Merge Persistent templates into Customer and Checkout #70
Comments
I agree with this suggestion. Either relocate the templates from |
I'd go with moving them to Mage_Customer and Mage_Checkout as it's more intuitive that way. It makes more logic to go looking i.e. for the registration form inside Mage_Customer than inside some module that's actually an "appendage" to the existing customer account/session functionality from older versions |
Totally agree. Why did they included the Mage_Pessistent, by the way? |
@matneves I used to think that way but it sorts of make sense to have it in a separate module as it "touches" functionallity in both Mage_Checkout and Mage_Customer modules so it cannot be fully merged into either. I guess the whole module could be divided in two and then merge each part where it belongs, but I don't think it's worth the trouble. However I still stand firmly against the overriden templates that only bring confusion to developers that are unaware of them. I'll try to submit some code to see if this issue gets more attention |
@barbazul So basically deleting the previously deprecated templates. I'm on board with that. I've seen plenty of "developers" ask why their changes in |
What do you think? should we delete the old templates or should we move the changes in the new templates back to the old ones? I think the changes in the new templates can be simply replaced with a generic container called "additional" and have the layout in persistent use that container to drop the "remember me" boxes. The same pattern is used in other modules, after all |
I hate the generic "additional" container pattern. It's never clear what the purpose of that container is or which modules make use of it. By deliberately not being explicit you effectively have to read the entire codebase to see what might impact it. In practice, an end-user will flick some switches in the admin and something suddenly appears which breaks the layout because you had no idea you needed to test/accomodate for it. If you're going to explicitly place components, then do it in a traceable way by adding a named block to its parent — not by creating a false parent. At this point I think deleting the non-Persistent templates is better. We've already migrated customizations from each module in |
Meh. I'm not so convinced by your argument of having to trace where a particular container is used throughout the codebase when you have tools like Alan Storm's Layout viewer, Commerce Bug, Magneto debug, etc. But I agree deleting the old templates is the easiest and fastest route to take. I guess the only thing that keeps bugging me is that Magento2 is supposed to be a "reset button" in certain aspects and part of that reset would be to get those templates back where they belong (customer and checkout). But again, there is no reason not to commit the deleted files now and maybe refactor them back to the appropiate modules later |
On topic: Off topic: This is passable for extensions to drop-in their functionality, but Magento itself should be clearer. If you need to completely restructure the product view then the frustrating ambiguity of generic containers becomes more apparent. It's not a pattern we should strive for when more understandable alternatives exist without significantly more work. |
Totally agreed. Will submit the deleted templates as soon as I get my hands
|
Thank you for noting the issue with the templates duplication and performing the actual implementation. We appreciate your work, it made us gather together and think about a good solution. Unfortunately, we cannot accept your solution and the pull request. The reason is that, if we implement it, then Magento would lose modularity. I.e., removing So we took our developers to think about a good way to deal with the templates duplication, and we stuck to the generic containers usage, as was proposed above. It will be implemented soon. The pull request will be closed, this issue will remain open until the implementation is done. Thank you for the idea and work on this issue. |
@mage2-team Awesome. I totally agree with your argument on modules dependency. I already sort of felt that way but failed to put it into words. I am really pleased to know that you're working so hard in cutting the remaining ties between modules. I think the whole "Magento Framework" has great potential to build all kind of applications. I can see Magento suite of applications (not only ecommerce) in the not so far away future |
Closing the thread due to no activity. |
[GITHUB] Prevent a warning in activated developer mode when 'plugins' is no array #995
JS-353: Test/fix on touch devices Android/iOS
LYNX-47: Update magento-coding-standard to version 26
Since Mage_Persistent appeared, a bunch of templates from Mage_Customer and Mage_Checkout were never used again as they were overriden.
I think Magento 2 is a good time to clean this up and get rid of Mage_Persistent templates that override Mage_Customer's and Mage_Checkout's
The text was updated successfully, but these errors were encountered: