Skip to content
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

[BasicUI] App icons no more rendered in snapshot 4228 #2712

Closed
lolodomo opened this issue Aug 14, 2024 · 10 comments · Fixed by #2713
Closed

[BasicUI] App icons no more rendered in snapshot 4228 #2712

lolodomo opened this issue Aug 14, 2024 · 10 comments · Fixed by #2713
Labels
basic ui Basic UI bug Something isn't working

Comments

@lolodomo
Copy link
Contributor

image

It was still working in snapshot 4217

@florian-h05 : could it be due to the merge of #2606 ? I hope you tested the UI before merging.

@lolodomo lolodomo added bug Something isn't working basic ui Basic UI labels Aug 14, 2024
@florian-h05
Copy link
Contributor

I tested it but my testing was fairly limited.
Can you revert that commit locally and then build and try out?

@lolodomo
Copy link
Contributor Author

It works again if I revert gulp upgrade.

@florian-h05
Copy link
Contributor

Okay in that case I am sorry that this slipped through, let’s revert it then.

@florian-h05
Copy link
Contributor

See #2713.

@lolodomo
Copy link
Contributor Author

Just for my information is there a Git feature to simply revert a merged PR ?

@florian-h05
Copy link
Contributor

Yeah, on the bottom of a merged PR you can find a button to easily revert it from the GitHub UI:

image

@lolodomo
Copy link
Contributor Author

Ok, thank you a lot, I never saw that button !

@lolodomo
Copy link
Contributor Author

I am now trying to investigate what was wrong.
With Basic UI compiled with gulp 5.0.0, I got these errors in browser console:
image

If I check the font files sizes created by gulp into folder src\main\resources\web\fonts, they are fully different:

  • material-icons.woff:: 164 912 bytes with gulp 4.0.2 while 299 808 bytes with gulp 5.0.0
  • material-icons.woff2 : 128 352 bytes with gulp 4.0.2 while (231 689 bytes with gulp 5.0.0

Gulp is copying these files from ./node_modules/material-icons/iconfont
The sizes in this folder remains the same. So the problem is the copy of files done by Gulp 5.0.0 which changes the file content !

Our Gulp code:

	var paths = {
	        FontLibs: [
			'./node_modules/material-icons/iconfont/material-icons.woff*',
			'./node_modules/framework7-icons/fonts/Framework7Icons-Regular.woff*',
			'./node_modules/framework7-icons/fonts/Framework7Icons-Regular.ttf'
	        ]
	    };
	
	gulp.task("copyFontLibs", function () {
	    return gulp.src(paths.FontLibs)
	        .pipe(gulp.dest('./src/main/resources/web/fonts'));
	});

@lolodomo
Copy link
Contributor Author

lolodomo commented Aug 19, 2024

gulpjs/gulp#2790

With Gulp v5, you need apparently to specify encoding: false to stream.

https://medium.com/gulpjs/announcing-gulp-v5-c67d077dbdb7

Stream encoding

Our streams now default to UTF-8 encoding. Previously, our streams took whatever data was emitted without considering any encoding. However, in this release, we resolved a 10 year old issue to support custom encodings and we default these to UTF-8. Most usage of gulp won’t need to change anything, but certain plugins may produce non-UTF-8 output and you’ll need to set { encoding: false } on your gulp streams.

@lolodomo
Copy link
Contributor Author

Ok, with this updated code, font files are now unchanged:

	gulp.task("copyFontLibs", function () {
	    return gulp.src(paths.FontLibs, { encoding: false })
	        .pipe(gulp.dest('./src/main/resources/web/fonts'));
	});

Will have to check all Gulp tasks but I believe others are handling non binary files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants