Crud: [4.0][Bug] SimpleMDE loads font-awesome and overrides line-awesome icons

Created on 20 Dec 2019  路  7Comments  路  Source: Laravel-Backpack/CRUD

A cosmetic issue, but one that leaves the user a bit confused. The SimpleMDE fields loads the font-awesome css and changes the look and feel of the existing icons when line-awesome is used.

You can see an example at https://demo.backpackforlaravel.com/admin/monster/create#bigtexts

PHP VERSION:

PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with blackfire v1.24.3~linux-x64-non_zts73, https://blackfire.io, by Blackfire

LARAVEL VERSION:

laravel/framework v6.7.0

BACKPACK VERSION:

backpack/crud 4.0.24
backpack/generators 2.0.5
eduardoarandah/backpacklogviewer 1.0.6

Bug MUST

All 7 comments

Not an issue, but an option. You can avoid that the FontAwesome is automagically downloaded by adding an attribute like this example

        $this->crud->addField([
            'name' => 'remarks',
            'label' => 'Remarks',
            'type' => 'simplemde',
            'simplemdeAttributes' => [
                'promptURLs' => true,
                'status' => false,
                'spellChecker' => false,
                'forceSync' => true,
                'autoDownloadFontAwesome' => false,
            ],
        ]);

Maybe it can be improved in the field itself by looking at the config

Hi @timbertens ,

Ugh. You're right. I noticed this a while back, and haven't since - I figured it was fixed. But I thought it was because of the icon_picker field type, not simplemde.

I agree this should be fixed - now that I see it, I can't _unsee_ it 馃槃

@pxpm could you please take a look at this too? What do you think would be a good solution?

Cheers!

Hey guys,

From my research @timbertens is right, 'autoDownloadFontAwesome' => false, would stop simplemde from loading font-awesome.

The thing is, if we don't load font-awesome we might need to override simplemde toolbar icons with the class from other icons library. Currently "fa fa-bold" example.

I will have some test running on this.

Best,
Pedro

Great, thanks!

Solved by https://github.com/Laravel-Backpack/CRUD/pull/2395 - tagged and released in 4.0.35

Hi @timbertens ,

Ugh. You're right. I noticed this a while back, and haven't since - I figured it was fixed. But I thought it was because of the icon_picker field type, not simplemde.

I agree this should be fixed - now that I see it, I can't _unsee_ it 馃槃

@pxpm could you please take a look at this too? What do you think would be a good solution?

Cheers!

icon_picker did really cause issue... if any CRUD contains icon_picker with iconset set to fontawesome, the following icon cannot display (for my case)...
fa fa-newspaper-o
fa fa-thumb-tack
fa fa-group
fa fa-files-o
fa fa-cloud-upload
Example: Icon Picker + File Picker in same CRUD
image

@tabacitu i don't create new issue... i think it is closely related. Thanks for the hard work 馃挭

@kiddtang indeed the iconpicker has a lineawesome-fontawesome conflict too. That's why in 4.1 (which will be launched soon enough) we're using la la-newspaper - see PR https://github.com/Laravel-Backpack/CRUD/pull/2554

Just tested everything on 4.1 - no more conflicts now between the two fonts. But you'll have to wait for 4.1 to come out to get the upgrade sorry. I don't think it's going to be more than 7-10 days though.

Was this page helpful?
0 / 5 - 0 ratings