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

fix(material/tabs): deprecate backgroundColor API #28262

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

andrewseguin
Copy link
Contributor

Tabs background colors should be customized using the theming API instead of using component inputs. Adding a boolean check that can be modified internally to perform cleanup before v20.

@andrewseguin andrewseguin added the target: patch This PR is targeted for the next patch release label Dec 11, 2023
@Input()
get backgroundColor(): ThemePalette {
return this._backgroundColor;
}

set backgroundColor(value: ThemePalette) {
const classList: DOMTokenList = this._elementRef.nativeElement.classList;
if (ENABLE_BACKGROUND_INPUT) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe we should log a warning here if it's disabled so that internal users don't wonder why it does nothing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally - in fact I'd take this one step further and throw an Error to say it's not a valid input. I wish it was namespaced more specifically just in case it's used by a sibling directive, but I don't expect that to be likely.

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 Error will help perform a migration to catch all usages before we disable it

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Dec 11, 2023
@andrewseguin andrewseguin merged commit 771f1df into angular:main Dec 11, 2023
24 of 26 checks passed
andrewseguin added a commit that referenced this pull request Dec 11, 2023
@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 Jan 11, 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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants