Closed digiage closed 3 years ago
I uploaded a new version with this but apparently fixed. What MinifyAll version are you using?
Thanks for fast reply. It was v2.5.11, but there was a message like "refresh needed...". So I clicked that and now no minified file is exported. I get this message: Command 'Minify this document and preserve the original β' resulted in an error (command 'extension.MinifyAll2OtherDoc' not found)
@digiage I have checked your code with the version I just published this morning and it doesn't remove the "%" characters. Please check your MinifyAll version is 2.5.11
Try it and if the issue still persists comment again. Thanks and sorry for the inconvenience!
Thanks for fast reply. It was v2.5.11, but there was a message like "refresh needed...". So I clicked that and now no minified file is exported. I get this message: Command 'Minify this document and preserve the original β' resulted in an error (command 'extension.MinifyAll2OtherDoc' not found)
Please restart VSCode and this should go away
Thank you, but I have restarted VSC, uninstall and reinstal MinifyAll and restarted Windows. Nothing happens when I use the 'Minify this document and preserve the original' or other two commands. Error message is not there, but also no files are exported now. If I run the command from the Ctrl + Shift + P, then I get this message again (Command 'Minify this document and preserve the original β' resulted in an error...)
Can you run the command Minify the selected text or Minify this document? Because I know there is an issue with the right click minify this document and preserve the original in Windows.
This does not work too. I have tried other projects and also independent files with no luck. The right click on 'Minify this document and preserve the original' worked well before even on Win.
The issue still throws thiss error: Command 'Minify the selected document and preserve the original π' resulted in an error (command 'extension.MinifyAll2OtherDocSelected' not found)
I only added 2 regex expressions in today's update. There should not be anything related to the "command not found" error.
I've researching and as I expected this seems like a VSCode/Windows bug. Most of the people fix this by reinstalling the extension. But I would recommend removing it and looking for the VSCode extension file path and manually removing the extension folder if it is not removed. Anyways I'll try to look for more information
Seems like the out/ folder hasn't been uploaded to the vscode marketplace so any command will be found. I will fix it ASAP
Please update to the newest version and this should be fixed!
perfect. works well now. thanks
hi, sorry to bother you again, but it again stopped working. again exactly the same issue.
Like, suddenly? Did it work for you before right?
exactly, I am not sure how that is possible. It worked after your changes. still version v2.5.12. No method works. I also reinstaled plugin again and still the same. The only setting I changed was -min to .min and then to -min again. When ctrl + shift + p used, then again this message.
Well that's weird. Could you go to the VSCode extensions folder, and see inside the extension if there is an out/ folder? Or if the node_modules folder is there?
yes, they are
Are they empty?
no. if you need any other folder content, just let me know.
Ok thanks! I'll try to think for something
thank you. I investigate furthermore and found out that JS seems to be minified and some of css too. there is issue just with those marked css (in this particular project). Now I have the ending set to '-min'.
Do the other commands work? Or only the one you click in the explorer the file and minifies without opening the file?
yes. all the commands the same, except portions like "Minify selected text". That one I used to find the issue by minifiing parts of the file. The issue seems like a combination of comas and rgb, but when there are comas and spaces it works (rgb(226,226,226) vs rgb(226, 226, 226)). rgba works with comas, spaces works too. if I play around with the notation in files which did not work before, then it starts to work even with commands with β and π.
Here are some examples which might help to spot it:
background-color: rgb(48,75,138,.96); background-color: rgb(48,75,138); background: radial-gradient(rgba(156, 215, 232, .92), rgb(80,186,214)); background: linear-gradient(69deg,rgb(206, 66, 108, .91) 0,rgb(80, 186, 214, .94) 100%); background-color: rgb(226,226,226);
background-color:rgb(48 75 138); background: radial-gradient(hsl(342deg 59% 62%), #ce426c); background: radial-gradient(hsl(215.8, 63.9%, 69.6%), #4d7bbe); border: 1px solid rgb(226, 226, 226); background: linear-gradient(69deg,rgb(206 66 108 .91) 0,rgb(80 186 214 .94) 100%); background: linear-gradient(69deg,rgba(206, 66, 108, .91) 0,rgba(80, 186, 214, .94) 100%);
I'll take a deeper look at it
Could you try it again with the newest version (2.5.18) I've been really checking the deployment and what the causes might be, and I think I've fixed it, but I would like an extra confirmation of yours :)
Sorry to say, but at least some still persist. I upgraded and also later deleted (folders of extension) and reinstalled. I have made the css for testing if you want. Attaching test.css.txt
@digiage , I attach a video minifying the file you sent me (I only added a class to not make the vscode shout for incorrect code π)
So, all the minimization that i'm performing in the video doesn't work in your machine, right?
It looks different, then in mine. Isn't there anything in your VSCode which changes the syntax for colors? As of what I see, the issue is with rgb and comas (without spaces). I hope I got it correctly that the rgb() and rgba() should be equivalents so they both should take alpha parameter (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). In your video for linear-gradient there is rgb() with space and rgba() with comas. Both works for me too. for radial-gradient you have hsl, I have one parameter rgb(80,186,214).
Attaching animated gif of how it looks at mine. Hope that helps
@digiage , I attach a video minifying the file you sent me (I only added a class to not make the vscode shout for incorrect code π)
So, all the minimization that i'm performing in the video doesn't work in your machine, right?
oh, I see, in your video example you have the part mentioned under "works". Which is the code that I found working well :-)
@digiage , I attach a video minifying the file you sent me (I only added a class to not make the vscode shout for incorrect code laughing) So, all the minimization that i'm performing in the video doesn't work in your machine, right? Video prove
oh, I see, in your video example you have the part mentioned under "works". Which is the code that I found working well :-)
I also send you a video with all the extensions disabled but MinifyAll, so we can surely say that no other extension is interfering. Also I'm using all the default minifyall settings. the vid
So exactly what the problem is with these two codes? Is the issue from the 'command not found' fixed?
Thanks for all your patiente β€οΈ :octocat:
you nailed it. I disabled all the extensions with --disable-extensions, then enabled one by one and guess what... it works now with all extensions enabled. so, I am really not sure where the issue could have been.
Thank you for your time and quick replies and sorry to got you stucked for a bit.
Wow, so the issue will probably be caused by other extensions! You might try to disable one by one to try to see which one might be causing the problem.
We might consider this issue as solved, right? π
Yes, probably, but they are all enabled and it works now :-D So i guess I will not find out by disabling.
Yes, please consider the issue resolved. Gracias y saludos
This is a complete headache π, we will probably never know!! Remember to star the project to see the upcoming bug-free features π€£
If anything else happens feel free to post another issue and I'll be happy to help if I can.
Thanks for all.
Sorry to reopen. The issue appeared again. In settings I switched off hexa shortener, restarted VSC and minifiing stopped to work. So, I probably found the issue. It works well, if Disable Hexadecimal Shortener is checked. If unchecked, then it won't work for my code (some types of color notations). I apparently also have to close VSC and reopen it for settings changes (hexa shortener) to apply.
Give some code samples and what the expected values are if anything is wrong.
Steps to reproduce:
Ok, it doesn't work for me either. I'll take a look at it
Please check v2.5.21 as this might at least make the minifier to work
thank you! I have tested a few cases and files and it seems to work well. Not sure if the settings option "hexa shortener" has any impact if selected or not, but this does is not crucial ;-)
Hi again @digiage I've fixed the MinifyAllCore colour minifier, it seems that for hsl values or rgba, it throws an error, so I only added a couple of try-catch clauses to check if the minimization could be done or it failed.
And the setting hexa shortener was indeed crucial.
So... everything works back again right? Should we close this issue or is anything else to be reviewed.
Thanks for your patient β€οΈ
Perfect. thanks. I think you can close this one. If you want, check if the minify shortener has now any effect (if it shortens colors) when unchecked, but that does not belong to this thread. Have a good one.
It doesn't minify colours if unchecked. But for now, it will not minify colours if the minifier doesn't understand the colour format. So it will not minify the colours even if set to it, but just in some scenarios where you are using 'hsl' or other functions. Maybe rgba might also not be minified.
Sorry for the inconvenience! I'll try to fix it when I buy some free time
π Bug Report
Describe the bug
seems like the minify CSS now stripping out the '%'. I found out it strips % for those in my css: width: 100%; ( -> width: 100; ... etc) height: 100%; -webkit-text-size-adjust: 100%; -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; border-color: hsl(188deg 54% 70%); ( -> border-color: hsl(188deg 54% 70);) -webkit-transform: translateX(110%); transform: translateX(110%); -webkit-transform: translateX(0%); transform: translateX(0%); top: 40%; max-width: 80%; top: -50%; bottom: -50%;
It also seems it keeps % for the float numbers like 16.6666%.
Is this a regression?
I believe so. I have made minifying before and it never broke the design.
To Reproduce
Expected behaviour
It will keep the percentage.
Media prove
Your environment
Additional context
*