joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.79k stars 3.66k forks source link

[5.x] non minified css #43241

Open brianteeman opened 7 months ago

brianteeman commented 7 months ago

Is it intentional that we only ship the non-minified css for awesomplete jquery-minicolors chosen

or is it a bug in our build scripts?

dgrammatiko commented 7 months ago

Is it intentional that we only ship the non-minified

yes, these packages do not provide non minified versions, thus the npm build script has exceptions for those

brianteeman commented 7 months ago

so why dont we minify them?

dgrammatiko commented 7 months ago

Actually I was wrong here, the part that I was referring is about JS: https://github.com/joomla/joomla-cms/blob/c594155371fc5c8efdf3039d4de6a80fc09068c3/build/build-modules-js/init/minify-vendor.es6.js#L8

About the css you're asking:

Although you're right and these files should've both a minified and a non minified version this needs an exception in the tooling. IMO all these packages could/should be dropped instead of patching them here...

brianteeman commented 7 months ago

keeping them or dropping them is a different discussion. There might be other vendor files that only ship non-minified css in the future

while they are present they should be minified and the tooling needs to be updated to do this.

richard67 commented 2 months ago

The debugbar css media/vendor/debugbar/debugbar.css is not minified, too, and also not gzipped when building a package on the current 5.23-dev branch. In 5.2 beta 2 we had it minified and gzipped. The file provided by debugbar is not minified, so the "yes, these packages do not provide non minified versions" does not apply here.

dgrammatiko commented 2 months ago

The gzip works only on .min.[css|js] all the files from debugbar are .css or .js so are skipped

richard67 commented 2 months ago

The gzip works only on .min.[css|js] all the files from debugbar are .css or .js so are skipped

But in 5.2 beta 2 as well as in 4.4 we have a minified file media/vendor/debugbar/debugbar.min.css and a gzipped file media/vendor/debugbar/debugbar.min.css.gz, and the original file is also called debugbar.css.

So it seems something has changed between 5.2 beta 2 and now, and I would call that a regression.

dgrammatiko commented 2 months ago

Oh, is that due to changes on the tooling or upstream?

richard67 commented 2 months ago

Good question. I have no idea.

richard67 commented 2 months ago

Got it: The debugbar css is broken, so npm ci shows an error and doesn't minify it. See https://github.com/maximebf/php-debugbar/releases/tag/v1.23.0 and https://github.com/maximebf/php-debugbar/pull/675 . We just need to update to that version. PR is on the way (but not by me).

brianteeman commented 2 months ago

pr done