Embeddable widgets have proliferated the web since JavaScript was born in the mid-nineties, and even before. Since the days of CGI counters, we have come a long way, with companies like Intercom and Stripe providing drop-in code to render components that provide rich and interactive experiences within customers’ existing sites.
At Tito, we have provided an embeddable widget since early on. When it came to rewriting it, we wanted to keep the things that made it great: a simple drop-in native-like web component that was easy to customise with CSS and integrate with JavaScript hooks. Our secondary goals were higher level. We wanted an easy to use codebase, and a widget that could be the primary code that we used on our own checkout pages. We also wanted to hook in to the modern ecosystem of JavaScript package managers, bundlers and modules.
This talk will explore the process of upgrading an older widget to a modern codebase and framework, some of the advantages to be gained, and some of the challenges faced.