-
Notifications
You must be signed in to change notification settings - Fork 44
Instead of overwriting the minify_exclude value, append your css file to it. #19
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
Conversation
…hat configuration is currently not being merged due to a bug in Magento, this fixes issues when having minify js & css enabled.
I found a more "stable" solution for this issue which is explained over here: https://magento.stackexchange.com/a/198480/2911, I feel like this is a better solution then what's in this PR because if you install other 3rd party modules which also define the I can take a look at changing this, but not sure when I will find some time, maybe during the weekend... |
Hey, to be honest, I am not sure which solution is better, so I trust you, if you say, that the other one is better :-) |
…icts with other modules which try to do the same, since those configuration values aren't getting merged in Magento right now.
@sydekumf: I've added a new commit, which seems to fix the issues. Can you do a review? I tried to adhere to your code standards, but I might have missed something, feel free to let me know or fix yourself after merging :) This solution is better then my previously suggested solution, because if using multiple 3rd party modules which modify the setting using xml, only one module's configuration would win. With this change, it should merge it with the configuration which is set by Magento or other 3rd party modules and the chance of problems is much lower. If you are interested, I'm working on a fix to get included in Magento 2.3 if accepted, to make the merging work properly using xml, but the structure of the xml will change a little bit: magento/magento2#13687 Oh: and big thanks for the module, a customer of ours is really happy with this! |
So I look into this and I am still not sure how to proceed. In my opinion, the issue is solved in 2.2 as they increased the version dependency for |
Hi! Ah, sorry, I didn't notice the version requirement of Then about the
Hope this makes it a bit clearer? :) Thanks! |
Yes, the module should still support 2.1, if you look into our releases: https://github.com/Magenerds/PageDesigner/releases So your change should be done in a separate branch, branched out of the tag 2.0.0 and then we do a 2.1.0 tag. As we don't need your change in 3.0.0, as this is compatible to M 2.2 and M 2.2 has the new Also, I saw, that in your fix, the tiny_mce directory is still missing or do I understand that not correctly? |
@sydekumf: I'm afraid that's not so easy as you think, because version 3.0.x of your module also supports Magento 2.1, otherwise you would have to remove Regarding the |
You're right, I removed the composer.json dependency to M2.1 in the latest versions. It is intended that newer versions of PadeDesigner are supported for M2.2. So everything >= 3.0.0 = M2.2. |
Can I suggest another approach? You create a version 4.0.0 which is for M2.2, and leave 3.0.2 to be compatible with 2.1 (since it currently already is so). Otherwise people installing this module on Magento 2.1 using composer and don't specify a certain version will still get version 3.0.2, and that doesn't match with what you are saying above. Anyway, for me to create a new PR on a different branch, you would first have to create a new branch for me to work on, otherwise I can't send in a PR against a different branch. So if we want to do this properly you could create a branch "v3" (you can pick your own name) based on commit 719ad92, on which I can apply this PR. This branch is then meant for Magento 2.1. You can leave the master branch as is en we can remove the But you'll need to remember that you'll have to maintain two branches from that point on. Another approach could be that we add a check in this PR to determine which Magento version is being used, and only execute the code in this PR on Magento 2.1 and not 2.2 (if we want to be even more strict, we can try to check for the version of the By using this approach you would only have to maintain a single branch which is compatible with both Magento 2.1 and 2.2 Just some ideas, let me know what you think. I understand this is pretty complicated stuff. |
Yeah, you're totally right. It is complicated :-) And I appreciate your feedback to that! I think your proposal is the best right now, that we include checks which Magento version we are on (or tubalmartin version) and dependent on that we can act differently with the merging. |
@sydekumf: ok, I've updated my PR with something I believe works. Steps to test:
Tested on a Magento 2.2.2 installation, result:
Tested on a Magento 2.1.7 installation, result:
I wanted to find something simple to test the version of So if it detects that I think this should be pretty robust. Feel free to test and/or give feedback! |
* | ||
* @return bool | ||
*/ | ||
private function isCssminLibraryOlderThenVersion3() |
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.
Than
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.
Fixed, good catch!
…'s the case exclude the pd-ui.css file from minifying.
219bf4b
to
ad7c8e2
Compare
Great work! Thanks for your PR, we appreciate any new ideas :-) |
Thanks @sydekumf: just verified version 3.1.0 on a production install with Magento 2.2.2 and it all looks ok, no problems anymore! Thanks for the collaboration! |
Fixes #17