-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Simplified persistent
templates: removed RWD's ones and merge differences in base
#34
Simplified persistent
templates: removed RWD's ones and merge differences in base
#34
Conversation
An example of something that might break. This HTML isn't in maho/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml Lines 172 to 174 in 2285ea2
|
what if we migrate the difference between rwd/default/layout/persistent.xml and base/default/layout/persistent.xml into base/default/layout/persistent.xml and remove rwd/default/layout/persistent.xml? |
Something like this, yeah. I also wonder if we can get rid of templates such as |
exactly that would be lovely, it happened to me many time to start debugging a template only to find out that I had to work on the persistent one or the other way around. do you want to keep working on this? |
Yeah, I'll work on this because it will simplify the EAV PR. |
beautiful! @justinbeaty can I add return types to public methods instead of the docblock? |
Yes, go ahead. I must get in the habit of doing that myself. Will do RWD theme later today... |
I'm wondering, can't we just remove the persistent/* templates and merge the features into the other ones with some "if persistent enabled"? |
@fballiano One thing about removing the template files in I added a simple method to |
Yes, I already have done that for the base theme, but see previous comment. |
mmmm (I'm thinking) we could add a check to the health-check script (if there's a app/design/*/persistent then alert) and put it in the release notes, because the "settemplateifexists" has to check on the filesystem to find the files across the fallback system only if somebody didn't update their theme. at this stage of the project I think we can do this. but let's think about it |
The health-check script is a good idea, and the solution is simple for the end user: they just need to move the files from But I did a quick benchmark, when loading So it's not a huge performance loss, but if we can avoid it then it's better. It's also possible to use the fallback for the first release of Maho, and drop it in future ones, but as you said that's probably not needed at this stage of the project. I'm not sure if the Anyway, I'll leave the commit for now, but feel free to make the final decision to revert it. |
@fballiano Why remove the rwd persistent templates? There are differences between them and the base theme. |
Also I don't think the remember me popup is broken, but it's definitely an outdated concept so I'm not against removing it. |
aren't the differences only estetical? I tested this version without the templates and it seems to me to look the same |
I was clicking on it and nothing happens and there's no "dom structure" for it to show nor anything in the developer console. anyway everybody knows what a "remember me" is today. |
The RWD ones are more complete, they do things like checking is users are allowed to register, have better form field autocompletes, and some other things. I am in the process of migrating some of those changes to the base theme anyway. We can get rid of the RWD ones if you'd like, but there will be some RWD theme specific stuff going in there (such as classnames on html elements.) |
ok i'll revert it
from what I've seen the end result seemed identical, and if it's just class names then I'd fix the layout in the CSS instead of having a duplicated template |
…plate/persistent" This reverts commit bd625b8.
I'll combine it all into the base theme files, but will finish tomorrow. |
I’ll also try to sleep now 😊😊
Il giorno lun 30 set 2024 alle 00:35 Justin Beaty ***@***.***>
ha scritto:
… from what I've seen the end result seemed identical, and if it's just
class names then I'd fix the layout in the CSS instead of having a
duplicated template
I'll combine it all into the base theme files, but will finish tomorrow.
—
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG6DLZDSIPKD7MVQDP265DZZCFFTAVCNFSM6AAAAABPAXBN3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGY2TENJWHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Merged all the functionality into the base templates. Need to test combinations of |
I've tested everything I can think of, and all is working. All that is left is to decide about the |
As a side note, I think the whole Mage_Persistent module is pretty outdated as a concept, and could be removed entirely. Why have two cookies, where one ( Nothing in this PR would be wasted if we went that direction, instead it was a necessary first step. |
Thank you @justinbeaty, such an amazing job like everything you did. Completely agree that the whole persistent module is a thing of the past and the "extend cookie lifetime" is actually a simple and very cool idea! I was wondering about the |
Actually, I think let's get rid of the The reason I say that now is because if we remove the persistent module, then we don't want to load templates that call a non-existent function, i.e. here: https://github.com/MahoCommerce/maho/blob/main/app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml#L46 Let me remove that call, and then we can merge. Then I can make a PR for removing the persistent module, as I think it will be pretty simple. Then back to the EAV module. :) |
persistent
templates: removed RWD's ones and merge differences in base
look at this commit 2285ea2 becoming a PR in openmage OpenMage/magento-lts#4244 😂 |
Hm, yes surely this PR prompted that, but the very first comment in this PR mentions that it will break things without template changes. The magento devs severely neglected the base templates. |
For some reason, the RWD theme sets some templates to the ones in
template/persistent
without checkingifconfig
.I have not tested this yet. None of the templates that are now used (i.e.
customer/form/register.phtml
) exist in the RWD folder, so they fallback to base. There are some visual differences between the templates so it's possible this breaks something in RWD.