Forum Academy Marketplace Showcase Pricing Features

Plugin: Iconify by pticon

Thread dedicated to Iconify plugin

DEMO: https://pticon.bubbleapps.io/iconify
Plugin: https://bubble.io/plugin/iconify-1604083196447x185573648335896580

1 Like

Hello @rico.trevisan ,

Apparently bubble used my email Alias as the name, that’s why you could not have find me as @pticon. But here we are. Thank you for using this plugin and let me take a look on your points (CSS/JS Timing + best practices)

  1. I’ve just create new thread dedicated only to Iconify plugin (as you can see, please let’s continue our chat here)
  2. Since all over Iconify website the creators mention v. 1.0.7, am using this one. Honestly I had no clue, the v.2 exists and what I found, even documention is not backward compatible, so I can try at least what will happen once I change the JS source and I will test it when I will have enough time (I did not touch this plugin since it fulfilled my personal requirements)
  3. Surely I can upgrade even the API, this update came after creation of this plugin
  4. I just found out, even the Demo page link is set in plugin, there is no link on plugin page, so here it is (https://pticon.bubbleapps.io/iconify). You can see there I do not recommend using this plugin in repeating groups, because the behaviour is unpredictable even though this plugin works well in RGs on my demo page and either in my project (not published yet). I was not even able to reproduce the issue on 100%, it happen sometimes while calling icons from nested/refrenced tables.

  5. Regarding to the BUG you have, how do you call the Icons? Because clearly the text comes empty to the properties.icon.
  6. Timing is bit complicated when writing the bubble plugin (https://manual.bubble.io/building-plugins/loading-data) . I’ve spent lot of time by searching how it works and did not found any answer. Bubble promises when the plugin expects data, it fires asynchronous action, but honestly, I feel like it does not work and I’m not the only one.

Because I’m not the real developer (I’ve learned JS basics just to write this plugin) I’m opened to any suggestions about the code. This is also the reason, why the code is Open Source.

UPDATES:
2. JS cannot be replaced, all Icons disappear, so it’s really incompatible.
3. API cannot be upgraded because it impacts the behaviour (I did a quick test), so I’ll let it as it is and try to upgrade it once I’ll have more time to dive in.

1 Like

I noticed the following if I set the name dynamically I get:

The Iconify plugin / Iconify element threw the following error: TypeError: Cannot read property ‘trim’ of null
at eval (PLUGIN_Iconify-update–Iconify-.js:11:32)
at https://dhtiece9044ep.cloudfront.net/package/run_debug_js/6b612deb538dbb14b1ebe68d89fdb6f27e2787c774607ae4e09d26035538b7bd/xfalse/x14:6:2069250 (please report this to the plugin author)

In this case name is being dynamically loaded into a Set Custom State on page load and I’m using a reusable element.

But I found that if I set a default value in the name it doesn’t give the error and loads the correct icon dynamically. Apparently it seems that at the time of loading it still doesn’t have the value and gives the error. That’s why setting a default value doesn’t happen.

I see, honestly if you take a look on my previous post in this thread in point 6 I am writing about Timing complexity in bubble. In Bubble documentation you can find a mention, that bubble fires the javascripts when the data is available, which from my perspective is not true. So what are you experiencing is something I just cannot handle. The data is being recieved too late or the icons javascript is being fired too soon. Also I have captured, that the javacripts actually fires several times during loading - so my question is, do you see the icon you are trying to call when the whole page is loaded? If so, I would just add condition that the trimming will not be applied on empty value.