Wednesday, January 2, 2019

Sitecore Icon Search v2.0 and Firefox Support


With the holidays behind us and 2019 in full swing, I’m excited to share new updates to the Sitecore Icon Search browser extension offering.  Considering I had some significant time off from work, I was able to pack in several exciting new features in between holiday festivities that I hope will make the experience even better for Sitecore developers.

Chrome Extension v2.0

Improved Search with Synonyms

When the Sitecore Icon Search Web App was released, one suggestion that stood out was



It's true, the search relied solely on the icon's name.  Unless you get the right name, you may miss an icon that may work better in your situation.

Well, phase 2 is here!

Utilizing the Google Vision API and Datamuse API, I wrote a couple of PowerShell scripts to process each icon in the dataset through each respective API and added the results into a new ‘attributes’ column to the existing data file (this column is hidden from general view).

The Google Vision API processed the image itself and primarily provided color attributes for every icon.  When searching, specifying a color may narrow down or help target the right icon.


Using the Datamuse API, I passed in the name of each icon and returned a maximum of 10 synonyms per icon and stored it into the ‘attributes’ column as well.   You can now search for a generalized term and likely retrieve new icons that may work for you



Offline / Localized Environment Support

Another feature that’s been requested has been to allow the extension to function when an internet connection is unavailable.   This makes plenty of sense as development is often done locally and doesn’t always require an online connection.

The problem stems from how the extension loads the icon images.  Up until now, the source of the icons has always been direct references to Sitecore’s website.  Images are lazy loaded based on the user’s search parameters.  When you lose internet connection, for icons that haven’t cached, you’d see broken images:

Not cool.

The extension is now 'context aware' and detects when you’re within the Sitecore shell.  Therefore, the extension will rely on the current local Sitecore URL to load icons (instead of relying on Sitecore’s domain).  This allows the extension to work offline.

Additionally, icons that are not available for the specific version of Sitecore will display a message stating it.

When you attempt to load the extension outside of a local Sitecore solution while offline, a pop-up will display:


If you select Offline Settings, you’ll be taken to the options menu where you can enable the Image URL Override option and set a URL domain to a local Sitecore instance.  By enabling this setting, offline the extension will always use this local domain vs the Sitecore domain, allowing more control in offline mode.



Firefox Add-on v1.0


via GIPHY

I realize that not everyone uses Google Chrome as their primary browser.  Even I use Firefox as my backup browser.  Luckily, Firefox offers a very similar development structure for ‘Add-ons’.  With some fiddling, I managed to port over the Chrome extension to a Firefox Add-on. šŸ˜ŠšŸ‘

Version 1.0 contains all the same features built for Google Chrome up to now.

Add it here!


As always, I'm open for feedback.  DM me on Twitter for any bugs, issues, or suggestions.

0 comments:

Post a Comment