-
-
Notifications
You must be signed in to change notification settings - Fork 439
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
Removed decorate*()
js functions
#3410
Conversation
I agree. Do you have in plan a replacement to keep the same behavior? |
not at the moment (didn't have time yet) but I think it could be added :-) |
It is fine to set this PR as a draft until there is a solution adapted to our days fir what we are removing here. |
At some point we may be able to do this, but I'm worried about the extensions that use this library. I have so far five in production, either I should make a conversion to jQuery (the fastest way) or to JavaScript (a little more complicated and time-consuming). If I don't adopt any of the solutions, then I can keep the library and add it manually for functionality. What if we removed everything that is old in OpenMage, including this library and it would be added by those who need it with Composer? |
the functions are still there, so there will be no break, but yes you'll lose the functionality. I think that who really needs these functions can just copy them and put them in their javascripts ;-) although for sure somebody has created a library for that. |
Should even/odd/first/last be added to CSS-files to keep current output? |
I think they were talking about removing Prototype.js as a whole, which would lead to issues with 3rd party extension beyond CSS classes. |
RWD doesn't have even/odd stripes already, as shown in the screenshots. |
There is an impact, but it's mostly marginal. |
@loekvangool the only one is in skin/adminhtml/default/default/boxes.css (the other ones as alread CSS based even/odd ;-)) I can for sure take a look at skin/adminhtml/default/default/boxes.css no problem |
There are a couple more hits in boxes.css, but yeah it's barely anything. There's also a CSS class |
Your're right for RWD, but PR removes it from "base" template. I know other themes have been removed, but i know some stores that rely on modern theme ... is this a sure shot? |
base template doesn't have CSS so we can't add any CSS to that, and it makes no sense in 2023 to add even odd classes via php. nth-child is extremely widely supported since years: https://www.w3schools.com/CSSref/sel_nth-child.php and we're talking about "next". |
@loekvangool seems grids work fine anyway with this PR: because those even/odd classes are injected via PHP, so I'd say there's should be nothing to add to this PR. |
Indeed |
"nth-child" ... this is why i asked for. I thought even/odd/... has to be changed in CSS files. |
I have not tested this PR and I will not approve it without being convinced that the change is mandatory. Those functions apply to many classes/IDs of some elements in the page. For example class/ID "product_comparison", I need to see the effect in the browser before and after the change. All these elements may need to be added to the CSS/SCSS files to keep the decoration effect. |
I don't think there's anything that could be added in the CSS, |
Can I suggest a |
After #3526 got merged maybe we can merge this one in the |
decorate*()
js functions
M1 had 4 decorate*() javascript functions, that are used (mostly) to add even/odd classes to HTML tables and things like that. The removal of these functions was discussed a couple of times already:
but I think that in 2023 we should work on this.
This PR:
Since the functions are not removed by this PR it's technically not a breaking change but... it changes the final rendering of the pages so... I'd still merge this in the
next
branch.This could also be considered a small step forwards removing prototypejs.
Fixes #3043