Skip to content

Conversation

@KarelWintersky
Copy link

  • added MAX Messenger widget
  • added optional svgIconRaw key for widget definition (required for MAX)
  • added example.html
  • updated README

- added optional `svgIconRaw` key for widget definition (required for MAX)
- added `example.html`
- updated README
@KarelWintersky
Copy link
Author

KarelWintersky commented Jan 27, 2026

Unfortunately, the svgIconRaw key is required in widget definitions. The current library implementation and the svgIconPath key only allow icons consisting of a single

<path d="...">

element, excluding even a fill, let alone a gradient or additional elements (circles, squares, etc.).

Modern icons are somewhat more complex than a simple "closed vector path," so we had to add an optional svgIconRaw key to the widget definition, which allows us to define the entire SVG icon.

In the case of Messenger Max (let's leave aside political arguments; business requirements are business requirements), the size increase is insignificant. 1833 bytes for maxmessenger.js versus 4414 for viber.js or 2896 for reddit.js.

I've modified the code so that svgIconPath takes priority. If it's missing, svgIconRaw is expected. If not, an empty string is substituted.

For testing, I added example.html , which uses the compiled "release" version of the library.

I wasn't able to build the library with shadow.styl exported to likely.css, but I have an excuse: I'm not a front-end developer, but a back-end developer, and I use a completely different stack.

@NikolayRys
Copy link
Owner

Hi, thanks for the submission, I'll take a look at it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants