Thread dedicated to Iconify plugin
DEMO: https://pticon.bubbleapps.io/iconify
Plugin: https://bubble.io/plugin/iconify-1604083196447x185573648335896580
Thread dedicated to Iconify plugin
DEMO: https://pticon.bubbleapps.io/iconify
Plugin: https://bubble.io/plugin/iconify-1604083196447x185573648335896580
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 - #9 by rico.trevisan)
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.
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.
Hi @dave.kolaja !
Continuing our conversation in plugin page about the iconify element being inside of an clickable group, I reviewed the plugin code and I think I can help! Is it possible to allow forking the plugin?
Hello, send me a private message with your registred email address and Iāll add you as plugin editor.
Hi! I need to display country flags. I recorded all countries in option sets. Flags, via icon values: emojione-v1:flag-for-japan
I load the data dynamically.
The icon is visible only if the page is reloaded before.
can someone help me with this? I want the icon to be visible without reloading the page.
http://joxi.ru/E2pw7ayCvB56lm - first page load and after reload the page
http://joxi.ru/J2bGdwWIq4jRkA - no page reload
Hi, unfortunately iconify plugin fires only once during page load. Which means, if the icon name is not available at the start, the original iconify.js will not call it from its servers. This plugin does not use API to retrieve icons, thatās why even users on free plan can use it. However Iāve managed to make a WORKAROUND, but bear in mind I strongly DO NOT RECOMMEND to use Iconify plugin in repeating groups, since sometimes I was experiencing unexpected behaviour.
Sometime in the past few weeks, Iconify icons in my app stopped displaying on Chrome, but still display on Safari.
Is anyone else experiencing this issue? Any fixes identified?
Yes! I came here to say the same thing. For some reason, the same icon will render properly in Safari/Firefox, but wonāt display in Chrome. In HTML, the code for the missing iconās svg tag has a height and width of ā-2pxā, but in Safari and Firefox, the height and width are correct.
For example in my site, I have a list of topic areas with associated icons.
They look like this in Firefox and Safari:
However, in all Chromium browsers, it looks like this:
The first icon is missing, as you can see.
The html of the missing icon in Safari is this:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="53px" height="53px" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512" class="iconify" data-icon="fa6-solid:landmark-dome" data-width="53px" data-height="53px" data-inline="false" style="transform: rotate(360deg);">...
However, in Chromium, the code is:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="-2px" height="-2px" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512" class="iconify" data-icon="fa6-solid:landmark-dome" data-width="-2px" data-height="-2px" data-inline="false" style="transform: rotate(360deg);">...
Notice the size in Safari is 53x53 px, but for some reason the size in chrome is -2x-2 px. Any help in figuring out what could possibly be going on here would be greatly appreciated! If not, then I may have to switch to another plugin for this site.
Ok, so I just read all the above about not putting iconify in a repeating group. Perchance thatās my issue above. The workaround mentioned here requires that you know which icons youāre offering ahead of time. In my case, I allow users to select an icon from iconify.design for each record in the repeating group. So it looks like Iād have to offer them a subset of pre-selected icons to have the option set workaround work. Is that correct?
For those having the issue with the first icon in repeating groups not being displayed in Bubble v21, I can recommend checking out the plugin Iconify Extended, which was recently released: Iconify Extended Plugin | Bubble
After some initial testing I decided to spend the time replacing all 150 instances of Iconify with the Iconify Extended plugin in my app. Been testing it for a few days, and it seems to have solved several issues I had with the previous plugin:
Ohhh, this is great to hear. Iām terrified to replace the 10,000,000 I have throughout my app hahha.
For anyone who wants to solve the problem of the first icon not showing up, you can apply some CSS to solve the problem (does not solve the JS errors, but visually seems to solve all problems Iāve had).
IMPORTANT NOTE
This would affect any SVG. I havenāt been able to narrow it down just to iconify. So please improve/amend to fit your needs. But if you need a quick fix and donāt have any other SVGās on your app it works.
svg {
display: flex;
width: inherit;
height: inherit;
}
that really great, but i can someone give us css/js code to fix the delay on show/hide (really annoying)
Look at the iconify settings on the icon. There is a ātimingā or something like that that defaults to 200ms. I always set it to 0ms immediately. Itās a dumb default.
Is that what you mean?
@oli1 you can target iconify elements using .iconify selector instead of svg.
But plugin authors @dave.kolaja , come on, fix this. You have 72000+ apps using it.
Hello,
Iconify icons in my app stopped displaying on Android, but still display on Apple.
Is anyone else experiencing this issue? Any fixes identified?
Thanks in advance,