11

DevTools architecture refresh: migrating to Web Components

 3 years ago
source link: https://developers.google.com/web/updates/2020/12/migrating-to-web-components
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

DevTools architecture refresh: migrating to Web Components

Jack Franklin
Googler building Chrome DevTools and Puppeteer and web tooling.

When DevTools was first created many, many years ago the team chose to build a bespoke UI framework. This was a reasonable choice at the time and has served DevTools well.

But since then various features have landed in the platform and one of those, Web Components, is a great fit for building new UI elements in DevTools. By leaning on what the platform provides we can greatly reduce the amount of bespoke UI code we have to maintain and invest more in building features for DevTools, rather than supporting bespoke infrastructure.

To help with the transition, we created a guide to building UI elements in DevTools to share with the wider DevTools team. Some of the guide is bespoke to DevTools and its architecture, which brings its own set of constraints, but some of it are generic guidelines on the approaches we’ve used to build, structure and test Web Components.

Today, we’re making this document publicly available at goo.gle/building-ui-devtools. If you’ve ever wondered more about how Web Components are used in large, real world applications, or some of the challenges that come with integrating components into a large, pre-existing codebase, this document could help and provide some answers. If you have any questions about our guidelines, feel free to tweet me.

Feedback

Was this page helpful?

To discuss the new features and changes in this post, or anything else related to DevTools:

Discover DevTools engineering content

Below is a list of everything that's been covered in the Chrome DevTools Engineering Blog series.

rss_feed Subscribe to our RSS or Atom feed and get the latest updates in your favorite feed reader!


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK