components icon indicating copy to clipboard operation
components copied to clipboard

bug(theming): expose undefined function `private-typography-config-level-from-mdc`

Open nzbin opened this issue 2 years ago • 3 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

https://github.com/angular/components/blob/956b86fc98241e3ed17128513163eaedd2843479/src/material/_index.scss#L145-L148

The function typography-config-level-from-mdc is undefined in mdc-helpers. In fact, we can find the function here.

https://github.com/angular/components/blob/956b86fc98241e3ed17128513163eaedd2843479/src/material/core/typography/_definition.scss#L216-L217

Reproduction

StackBlitz link: Steps to reproduce: 1. 2.

Expected Behavior

Expose the function private-typography-config-level-from-mdc.

Actual Behavior

The function private-typography-config-level-from-mdc is undefined.

Environment

  • Angular: 17.0.7
  • CDK/Material: 17.0.4
  • Browser(s): Chrome latest
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

nzbin avatar Dec 17 '23 15:12 nzbin

The functions that are exposed with a private- prefix aren't public APIs.

crisbeto avatar Dec 18 '23 06:12 crisbeto

@crisbeto Yes, I know private- is not public APIs. I just want to point it is a wrong expose. In fact, there is no typography-config-level-from-mdc in mdc-helpers.scss and it is defined in the typography/_definition.scss

nzbin avatar Dec 18 '23 06:12 nzbin

Ah yeah, I think we can just remove those. IIRC we had to expose them for the legacy components which have been deleted.

crisbeto avatar Dec 18 '23 07:12 crisbeto

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.