Skip to content

Upgrade FontAwesome

Axel Bocciarelli requested to merge up-fontawesome into master

I see you've discussed upgrading FontAwesome before, in #35 (closed), so I'm leaving this MR as draft to discuss. CRA v5 was warning about an outdated SCSS syntax in the FontAwesome package, so I thought it'd be nice to upgrade.

I'm upgrading to the free FA v6 package, up from v4, using the procedure explained here: https://fontawesome.com/docs/web/setup/upgrade/upgrade-from-v4 -- v6 includes a v4 shim for backwards compatibility, so it seems that everything still works as before.

BEFORE AFTER
Screenshot_2022-06-23_at_15-51-19_Daiquiri_UI_bl___VLM Screenshot_2022-06-23_at_15-49-13_Daiquiri_UI_bl___VLM

Obviously, the codebase is made to work with the v4 syntax, so using v6 class names and icon names is not recommended at this point. More work is needed to refactor TypeIcon and other components to work with the new class names (fa-solid, fa-regular, etc.)

Long term, the goal would be to use SVG icons as they provide some benefits over font-based icons (e.g. automatic accessibility and bundle optimisation).

By the way, I've noticed that src/components/form-widgets/DefaultTemplates.jsx uses @rjsf/core's IconButton, which, if I understand correctly, is a proxy for Bootstrap 3's IconButton component, which still uses the old glyphicon class names. Since Daiquiri UI is on Bootstrap 4, shouldn't @rjsf/core be replaced with @rjfs/bootstrap-4?

Edited by Axel Bocciarelli

Merge request reports