Merge fundamental web components from catapult to chops-ui |
|
Issue descriptionThere are a few web components that seem to be re-implemented occasionally: checkbox, switch, input, textarea, toast, radio, tab, raised button, loading spinner, loading bar, and possibly others. Various Chrome Operations apps require these web components to conform to Material Design 2 and a11y standards while consuming as little CPU and memory as possible. They should look similar between various apps, and possibly support some basic theming. paper-elements are easy to use and theme and support many features, but tend to be heavy on CPU and memory: https://github.com/PolymerElements/paper-elements sk-elements are very light-weight (don't even require Polymer), but may lack some features such as a11y and theming: https://www.npmjs.com/package/elements-sk The chromeperf dashboard v2 is growing some components specifically for its own use. They are light-weight (requiring Polymer 2.0) and support theming colors, but lack a11y and other features: https://github.com/catapult-project/catapult/tree/v2spa/dashboard/dashboard/spa ChOpsUI aims to be the canonical implementation of these fundamental web components for all Chrome Operations UIs. https://cs.chromium.org/chromium/infra/crdx/chopsui/ This bug will track merging fundamental components from catapult to chopsui in order to support chromeperf-v2. Since catapult doesn't use DEPS, it will commit chopsui in catapult/third_party. chromeperf-v2 will import them from there. Open questions: 0. Should chopsui plan to move away from requiring Polymer towards a-la-carte? This would block apps moving towards Polymer 3.0/LitElement, right? This could also someday be an opportunity to share code with sk-elements. 1. When can chopsui move away from HTML imports to ES6 modules? 2. How much theming should chopsui support? Colors? Button styles? Density? 3. Should chopsui provide icons individually? Chromeperf-v2 saved 30KB by copying select icons from iron-icons into its own iconset. 4. Can chromeperf-v2 share charting code with other apps via chopsui? There is an even broader range of charting features between chops apps, so perhaps this is a separate discussion.
,
Aug 31
Material Design also has a set of vanilla web components (that are not related to paper-elements). Have we looked at whether we can use those? https://github.com/material-components/material-components-web-components They also have "Material Components for the web" but as far as I can tell, these aren't web components (very confusing). But they seem to be in active development, so maybe we can wrap them? https://github.com/material-components/material-components-web |
|
►
Sign in to add a comment |
|
Comment 1 by zhangtiff@chromium.org
, Aug 28