Skip to content

Conversation

wagnermaciel
Copy link
Contributor

@wagnermaciel wagnermaciel commented Sep 18, 2024

This is part of a larger effort to remove the mat.core() mixin. The goal of this PR is to provide a way for components to load the styles for the .cdk-visually-hidden class without needing it to be loaded via mat.core()'s call to cdk.a11y-visually-hidden().

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Sep 18, 2024
@wagnermaciel wagnermaciel marked this pull request as ready for review September 18, 2024 21:11
@wagnermaciel wagnermaciel requested a review from a team as a code owner September 18, 2024 21:11
@Component({
standalone: true,
styleUrl: 'visually-hidden.css',
exportAs: 'cdkVisuallyHidden',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop the exportAs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this in because if I drop the exportAs I get a duplicate component ID error :( Is there another way to resolve this error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full error is:

Detected identical metadata between following components:
- _MatBadgeStyleLoader and _VisuallyHiddenLoader

The metadata of one of each of these components should be changed to be slightly different in order to avoid conflicts at runtime.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, then it should be fine. Another way to work around it is to add a host binding.

@wagnermaciel wagnermaciel removed the request for review from andrewseguin September 20, 2024 17:22
@wagnermaciel wagnermaciel added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker labels Sep 20, 2024
@wagnermaciel wagnermaciel merged commit 9b4085c into angular:main Sep 20, 2024
24 of 26 checks passed
@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 21, 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: 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