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

Itemize sanity checks #16617

Closed
mina-skunk opened this issue Jul 26, 2019 · 1 comment · Fixed by #16973
Closed

Itemize sanity checks #16617

mina-skunk opened this issue Jul 26, 2019 · 1 comment · Fixed by #16973
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@mina-skunk
Copy link
Contributor

mina-skunk commented Jul 26, 2019

Feature Description

Change type that MATERIAL_SANITY_CHECKS provides from boolean to:

interface SanityChecks {
  doctype: boolean;
  theme: boolean;
  version: boolean;
  hammer: boolean;
}

or even type boolean | SanityChecks for backwards compat

Use Case

We dynamically add the theme scss based on the user, this causes the warning

console.warn(
'Could not find Angular Material core theme. Most Material ' +
'components may not work as expected. For more info refer ' +
'to the theming guide: https://material.angular.io/guide/theming'
);

because the theme is not loaded yet when this code runs. Currently, to disable the warning we:

{ 
  provide: MATERIAL_SANITY_CHECKS, 
  useValue: false 
}

although the other checks could still be useful, if you could do

{ 
  provide: MATERIAL_SANITY_CHECKS, 
  useValue: {
    doctype: true,
    theme: false,
    version: true,
    hammer: true
  }
}
@mina-skunk mina-skunk added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jul 26, 2019
@andrewseguin andrewseguin added the P4 A relatively minor issue that is not relevant to core functions label Jul 31, 2019
@crisbeto crisbeto self-assigned this Sep 4, 2019
@crisbeto crisbeto added the has pr label Sep 4, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 4, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 4, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 4, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 5, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 5, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
jelbourn pushed a commit that referenced this issue Sep 6, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes #16617.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 7, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes angular#16617.
jelbourn pushed a commit that referenced this issue Sep 16, 2019
Allows consumers to disable individual sanity checks, rather than the all-or-nothing setup that we have at the moment.

Fixes #16617.
@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 Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants