Skip to content

Add font awesome 5 support#199

Merged
selul merged 5 commits intodevelopfrom
feature/130
Mar 16, 2022
Merged

Add font awesome 5 support#199
selul merged 5 commits intodevelopfrom
feature/130

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

Close #130

@girishpanchal30 girishpanchal30 linked an issue Dec 10, 2021 that may be closed by this pull request
@pirate-bot
Copy link
Copy Markdown
Contributor

pirate-bot commented Dec 10, 2021

Plugin build for 3b72ad9 is ready 🛎️!

@irinelenache
Copy link
Copy Markdown

irinelenache commented Dec 13, 2021

@girishpanchal30 Tested this feature:

Also how the filter provided should be used? I tried to test it but i couldn't make it work.

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

@irinelenache Fixed display icon issue when updating from the latest version of the plugin.

For filter:

  1. Add filter in your current active theme functions.php file
  2. Go to wp-admin/nav-menus.php
  3. Open any menu item and click on Icon: select button.
  4. Go to Font Awesome Tab and search your new icon name - https://tinyurl.com/y4yvdjac.

Thanks

@irinelenache
Copy link
Copy Markdown

@girishpanchal30 Now the icons work fine in frontend after updating, but there is still a problem in dashboard. Encountered it with 2 icons (Safari, Bitcoin)
dashboard: https://vertis.d.pr/4Av0Bg
frontend: https://vertis.d.pr/39FqaK

Followed your steps for the filter and it works fine 👍

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

girishpanchal30 commented Dec 16, 2021

@irinelenache Fixed the above issue please retest again.

Thanks

@irinelenache
Copy link
Copy Markdown

@girishpanchal30 Now the issue is fixed, thanks 🚀

@cristian-ungureanu
Copy link
Copy Markdown
Contributor

@girishpanchal30 I don't think this method of adding icons would work. As an end-user, it would be hard for me to connect to FTP, find the file and add something to an array every time I want another icon.

What I would do here is to create another category named Font Awesome 5 and load the new icons as we do with fa4
Screenshot 2021-12-17 at 15 33 12

We can avoid conflicts by not allowing users to use both fa5 and fa4 icon sets at the same time ... or at least display a notice somewhere in the dashboard that the icons might not work well together.

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

@cristian-ungureanu do you think it would be good if we register the fa5 icon as a new category? Because we already have 300+ icons added in our plugin.
As of now, I have added backward compatibility for fa5 icon or if user want to add more icon then he can use the filter.

Thanks

@cristian-ungureanu
Copy link
Copy Markdown
Contributor

@girishpanchal30 if adding a new category for FA5 is a bad idea, at least let's provide a way for the users to add fa5 classes in a field somewhere in the plugin. We can have a field where the customer adds all the classes that are needed separated with ",", then those icons will be available as the rest of the icons.
For example, we can have something like this: https://d.pr/pXxMou ... the location of that field can be changed and can be placed in another place, maybe after the whole menu setting.
Then we can use the content of that textarea as input for the filter we've added.

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

@cristian-ungureanu Yes, we can add a textarea field in the plugin settings panel. there are no hooks to add a field in you have mentioned location.

Ref - https://tinyurl.com/y3hsav6r

Thanks

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

@irinelenache Can you retest again? I have added a new field to add more FA5 icons
Ref - https://tinyurl.com/y3hsav6r

cc @cristian-ungureanu
Thanks

@irinelenache
Copy link
Copy Markdown

@girishpanchal30 Tested again and it works fine for me 👍
Note: After adding the classes and clicking on Save settings the menus page ../wp-admin/nav-menus.php should be refreshed for the icons to show up in icons list

If @cristian-ungureanu approves it, it can be moved to Ready to merge

@girishpanchal30 girishpanchal30 mentioned this pull request Feb 8, 2022
@irinelenache
Copy link
Copy Markdown

@girishpanchal30 Tested again and everything works fine 👍

@mghenciu
Copy link
Copy Markdown

Hi @girishpanchal30,

I've seen that you've requested edit acces on one of Menu Icon figma files.
Unfortunately we don't have any available editor seats in our Figma plan, but please let me know if you need help with something in Figma.

Have a great day.

@girishpanchal30
Copy link
Copy Markdown
Contributor Author

@mghenciu I need help here #194
Thanks

@selul selul merged commit 34ea0cc into develop Mar 16, 2022
@pirate-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.12.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Mar 16, 2022
@selul selul deleted the feature/130 branch February 25, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font Awesome 5.0

6 participants