1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

UIF - Prefer signal & change detection (#16940)

This commit is contained in:
Oscar Hinton
2025-10-21 18:52:40 +02:00
committed by GitHub
parent d3fc20f8b9
commit 65da23feaa
135 changed files with 503 additions and 51 deletions

View File

@@ -3,6 +3,8 @@ import { Component, HostBinding, Input, booleanAttribute } from "@angular/core";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "bit-spinner",
templateUrl: "spinner.component.html",
@@ -13,21 +15,29 @@ export class SpinnerComponent {
/**
* The size of the spinner. Defaults to `large`.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() size: "fill" | "small" | "large" = "large";
/**
* Disable the default color of the spinner, inherits the text color.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: booleanAttribute }) noColor = false;
/**
* Accessibility title. Defaults to `Loading`.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() title = this.i18nService.t("loading");
/**
* Display text for screen readers.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: booleanAttribute }) sr = true;
@HostBinding("class") get classList() {