Components: Proposal: Guide for creating compatible community components

Created on 20 Jun 2017  路  6Comments  路  Source: angular/components

Bug, feature request, or proposal:

Proposal

Expected behavior

I think it would be highly valuable to have a guide living somewhere in material.angular.io/guides that explained some of the best practices related with creating a high quality 3rd party component that will work with Material.

Some information that might be valuable to component authors:

  1. How to get theming to seamlessly work
  2. How to get packaging right
  3. Where to find accessibility resources that the team relies on
  4. ?

Perhaps even better would be a link to a starter repo that has a lot of the tooling in place to achieve 1 and 2

Motivation

It looks like some popular features will be left to the community (https://github.com/angular/material2/issues/860#issuecomment-306637337, https://github.com/angular/material2/issues/3262) and it would be great to set a standard for these so that authors can be confident they're doing it the right way.

P4 material.angular.io docs feature help wanted

Most helpful comment

I think this is a great idea

This will be easier once we release @angular/cdk (soon!).

All 6 comments

I think this is a great idea

This will be easier once we release @angular/cdk (soon!).

Suggested something like this couple of months ago https://github.com/angular/material2/issues/2691#issuecomment-273495016

Some decisions I've seen made here that custom libraries could utilize to be "high quality":

  • strictNullChecks compatible
  • Make components OnPush
  • Bidirectional support
  • Scope style selectors and avoid deep nesting for easier overrides
  • Components don't have outer margins

Also I could see it being useful to have instructions on extending mat-light-theme and mat-dark-theme to include custom foreground/background palette mappings.

My talk at AngularMix in October was primarily about this issue. Unfortunately, it wasn't recorded. The slides are available, but their value is limited since I gave a lot of live demos and walkthroughs. There are some useful links to resources at the end and some speaker notes though.

It covered packaging with the new Angular CLI library support and adding Schematics to the same workspace (in a separate project and NPM package).

I'm giving the talk again in January at DevFest Florida and hopefully it will be recorded there. Also I hope to add guidance on theming to that talk.

My talk at AngularMix in October was primarily about this issue. Unfortunately, it wasn't recorded. The slides are available, but their value is limited since I gave a lot of live demos and walkthroughs. There are some useful links to resources at the end and some speaker notes though.

It covered packaging with the new Angular CLI library support and adding Schematics to the same workspace (in a separate project and NPM package).

I'm giving the talk again in January at DevFest Florida and hopefully it will be recorded there. Also I hope to add guidance on theming to that talk.

It was recorded this time: https://youtu.be/OU6z3IKmyNI

Material Community Components and @devintent/dev implement a lot of the best practices for compatible community components.

There are also some really comprehensive examples of consuming the CDK that are now available. These include Nebular, ng-zorro-antd, Mosaic, and ng-lightning.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crutchcorn picture crutchcorn  路  3Comments

LoganDupont picture LoganDupont  路  3Comments

alanpurple picture alanpurple  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

MurhafSousli picture MurhafSousli  路  3Comments