guidocioni / point_wx

4 stars 0 forks source link

Change flags with `dash-iconify` #148

Closed guidocioni closed 2 months ago

guidocioni commented 2 months ago

We can use dash-iconify to directly query the flags only for the locations that we need and add them to the location instead of using the emoji which are hardcoded into flags.py. However I'm not sure if the cache will work with this as the icons will probably be saved as png or svg? We need to try.

There are many icons pack, even for regions so we could try that as well!

guidocioni commented 2 months ago

I tried this but it's not worth it for many reasons. The icons actually work for the callbacks related to the location selector and do not cause any issue with the cache.

Screenshot 2024-07-15 at 15 39 26

However, as we use these to create also the title of the plotly plots, we run into an issue as plotly titles do not accept arbitrary html code. We could rewrite this part of the code to only produce text inside of an image...but is that really worth it? Using Emoji is just easy as it works everywhere.

Honestly, as this doesn't really add much to the look & feel of the app I don't think it's worth considering.