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

feat(material/core): namespace m2-specific theming APIs #28892

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Apr 17, 2024

These changes rename the theming APIs that are specific to M2 to be prefixed with m2-. Subsequent changes will move the M3 APIs out of experimental and introduce a schematic to automatically migrate users.

BREAKING CHANGE:
The following APIs have been renamed. If you update using ng update, your app will be fixed automatically.

  • define-light-theme to m2-define-light-theme
  • define-dark-theme to m2-define-dark-theme
  • define-palette to m2-define-palette
  • get-contrast-color-from-palette to m2-get-contrast-color-from-palette
  • get-color-from-palette to m2-get-color-from-palette
  • get-color-config to m2-get-color-config
  • get-typography-config to m2-get-typography-config
  • get-density-config to m2-get-density-config
  • $red-palette to $m2-red-palette
  • $pink-palette to $m2-pink-palette
  • $indigo-palette to $m2-indigo-palette
  • $purple-palette to $m2-purple-palette
  • $deep-purple-palette to $m2-deep-purple-palette
  • $blue-palette to $m2-blue-palette
  • $light-blue-palette to $m2-light-blue-palette
  • $cyan-palette to $m2-cyan-palette
  • $teal-palette to $m2-teal-palette
  • $green-palette to $m2-green-palette
  • $light-green-palette to $m2-light-green-palette
  • $lime-palette to $m2-lime-palette
  • $yellow-palette to $m2-yellow-palette
  • $amber-palette to $m2-amber-palette
  • $orange-palette to $m2-orange-palette
  • $deep-orange-palette to $m2-deep-orange-palette
  • $brown-palette to $m2-brown-palette
  • $grey-palette to $m2-grey-palette
  • $gray-palette to $m2-gray-palette
  • $blue-grey-palette to $m2-blue-grey-palette
  • $blue-gray-palette to $m2-blue-gray-palette
  • $light-theme-background-palette to $m2-light-theme-background-palette
  • $dark-theme-background-palette to $m2-dark-theme-background-palette
  • $light-theme-foreground-palette to $m2-light-theme-foreground-palette
  • $dark-theme-foreground-palette to $m2-dark-theme-foreground-palette
  • define-typography-level to m2-define-typography-level
  • define-rem-typography-config to m2-define-rem-typography-config
  • define-typography-config to m2-define-typography-config
  • define-legacy-typography-config to m2-define-legacy-typography-config
  • typography-level to m2-typography-level
  • font-size to m2-font-size
  • line-height to m2-line-height
  • font-weight to m2-font-weight
  • letter-spacing to m2-letter-spacing
  • font-family to m2-font-family
  • font-shorthand to m2-font-shorthand

@crisbeto crisbeto added the target: major This PR is targeted for the next major release label Apr 17, 2024
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit labels Apr 17, 2024
@crisbeto crisbeto force-pushed the m3-theming branch 3 times, most recently from 9b867dd to ab7f7d4 Compare April 17, 2024 09:14
@crisbeto crisbeto marked this pull request as ready for review April 17, 2024 11:53
These changes rename the theming APIs that are specific to M2 to be prefixed with `m2-`. Subsequent changes will move the M3 APIs out of `experimental` and introduce a schematic to automatically migrate users.

BREAKING CHANGE:
The following APIs have been renamed. If you update using `ng update`, your app will be fixed automatically.
* `define-light-theme` to `m2-define-light-theme`
* `define-dark-theme` to `m2-define-dark-theme`
* `define-palette` to `m2-define-palette`
* `get-contrast-color-from-palette` to `m2-get-contrast-color-from-palette`
* `get-color-from-palette` to `m2-get-color-from-palette`
* `get-color-config` to `m2-get-color-config`
* `get-typography-config` to `m2-get-typography-config`
* `get-density-config` to `m2-get-density-config`
* `$red-palette` to `$m2-red-palette`
* `$pink-palette` to `$m2-pink-palette`
* `$indigo-palette` to `$m2-indigo-palette`
* `$purple-palette` to `$m2-purple-palette`
* `$deep-purple-palette` to `$m2-deep-purple-palette`
* `$blue-palette` to `$m2-blue-palette`
* `$light-blue-palette` to `$m2-light-blue-palette`
* `$cyan-palette` to `$m2-cyan-palette`
* `$teal-palette` to `$m2-teal-palette`
* `$green-palette` to `$m2-green-palette`
* `$light-green-palette` to `$m2-light-green-palette`
* `$lime-palette` to `$m2-lime-palette`
* `$yellow-palette` to `$m2-yellow-palette`
* `$amber-palette` to `$m2-amber-palette`
* `$orange-palette` to `$m2-orange-palette`
* `$deep-orange-palette` to `$m2-deep-orange-palette`
* `$brown-palette` to `$m2-brown-palette`
* `$grey-palette` to `$m2-grey-palette`
* `$gray-palette` to `$m2-gray-palette`
* `$blue-grey-palette` to `$m2-blue-grey-palette`
* `$blue-gray-palette` to `$m2-blue-gray-palette`
* `$light-theme-background-palette` to `$m2-light-theme-background-palette`
* `$dark-theme-background-palette` to `$m2-dark-theme-background-palette`
* `$light-theme-foreground-palette` to `$m2-light-theme-foreground-palette`
* `$dark-theme-foreground-palette` to `$m2-dark-theme-foreground-palette`
* `define-typography-level` to `m2-define-typography-level`
* `define-rem-typography-config` to `m2-define-rem-typography-config`
* `define-typography-config` to `m2-define-typography-config`
* `define-legacy-typography-config` to `m2-define-legacy-typography-config`
* `typography-level` to `m2-typography-level`
* `font-size` to `m2-font-size`
* `line-height` to `m2-line-height`
* `font-weight` to `m2-font-weight`
* `letter-spacing` to `m2-letter-spacing`
* `font-family` to `m2-font-family`
* `font-shorthand` to `m2-font-shorthand`
@crisbeto crisbeto self-assigned this Apr 17, 2024
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Apr 17, 2024
@crisbeto crisbeto merged commit 4ba4689 into angular:main Apr 17, 2024
24 of 26 checks passed
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 18, 2024
…e directory

Moves all of the M2-specific public theming APIs into a separate directory so they're easier to distinguish and so they don't interfere when we move the M3 APIs from experimental.

This shouldn't affect users since namespacing already happened as a part of angular#28892.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 18, 2024
…e directory

Moves all of the M2-specific public theming APIs into a separate directory so they're easier to distinguish and so they don't interfere when we move the M3 APIs from experimental.

This shouldn't affect users since namespacing already happened as a part of angular#28892.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 18, 2024
…e directory

Moves all of the M2-specific public theming APIs into a separate directory so they're easier to distinguish and so they don't interfere when we move the M3 APIs from experimental.

This shouldn't affect users since namespacing already happened as a part of angular#28892.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 18, 2024
…e directory

Moves all of the M2-specific public theming APIs into a separate directory so they're easier to distinguish and so they don't interfere when we move the M3 APIs from experimental.

This shouldn't affect users since namespacing already happened as a part of angular#28892.
crisbeto added a commit that referenced this pull request Apr 18, 2024
…e directory (#28901)

Moves all of the M2-specific public theming APIs into a separate directory so they're easier to distinguish and so they don't interfere when we move the M3 APIs from experimental.

This shouldn't affect users since namespacing already happened as a part of #28892.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 22, 2024
Adds a migration to account for the breaking changes in angular#28892. The migration changes all the places where functions and variables were renamed, as well as the usages of experimental APIs that were moved into stable.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 22, 2024
Adds a migration to account for the breaking changes in angular#28892. The migration changes all the places where functions and variables were renamed, as well as the usages of experimental APIs that were moved into stable.
crisbeto added a commit that referenced this pull request Apr 23, 2024
Adds a migration to account for the breaking changes in #28892. The migration changes all the places where functions and variables were renamed, as well as the usages of experimental APIs that were moved into stable.
@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 May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants