Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Guide for creating compatible community components #5250

Closed
willshowell opened this issue Jun 20, 2017 · 8 comments
Closed

Proposal: Guide for creating compatible community components #5250

willshowell opened this issue Jun 20, 2017 · 8 comments
Labels
area: material.angular.io docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue P4 A relatively minor issue that is not relevant to core functions

Comments

@willshowell
Copy link
Contributor

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 (#860 (comment), #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.

@jelbourn jelbourn added docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue labels Jun 20, 2017
@jelbourn
Copy link
Member

I think this is a great idea

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

@fxck
Copy link
Contributor

fxck commented Jun 21, 2017

Suggested something like this couple of months ago #2691 (comment)

@willshowell
Copy link
Contributor Author

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.

@Splaktar
Copy link
Member

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.

@wall-street-dev
Copy link

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

@Splaktar
Copy link
Member

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.

@mmalerba mmalerba added the needs triage This issue needs to be triaged by the team label May 20, 2020
@jelbourn jelbourn added P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels May 25, 2020
@jelbourn
Copy link
Member

Revisiting this, I think it's reasonable now to close this out. When this issue was first opened, the cdk hadn't even existed. Now, I think the idea of being "compatible" with Angular Material doesn't mean as much- it would mostly be covered by the theming docs (https://material.angular.io/guide/theming-your-components), creating/using harnesses (https://material.angular.io/guide/using-component-harnesses), and otherwise generally using the cdk.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material.angular.io docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

7 participants