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

common section card title subtitle leftside header #1557

Merged
merged 11 commits into from
May 29, 2024

Conversation

Yagnik56
Copy link
Collaborator

This PR contains a section card header on the left side, and a title subtitle component.

@Yagnik56 Yagnik56 self-assigned this May 21, 2024
@zackcl
Copy link
Collaborator

zackcl commented May 21, 2024

I think the chipText should be optional (chipText!).

I don't think link and linkText inputs are needed as they are fixed to opening a "View Logs" modal when the "View Logs" link text is clicked.

Screenshot 2024-05-21 at 12 01 14 PM

How about we update the inputs like this?

  @Input() title!: string;
  @Input() chipText?: string;
  @Input() subtitle!: string;
  @Input() showViewLogs?: boolean;

And HTML would like something like this:

<div class="title-header">
<h1 class="title ft-26-700">
  {{ title | translate }}
  <ng-container *ngIf="chipText">
    <mat-chip [color]="getChipColor(chipText)" selected>
      {{ chipText }}
    </mat-chip>
  </ng-container>
</h1>
<h3 class="subtitle ft-16-400">
  {{ subtitle | translate }}
  <ng-container *ngIf="showViewLogs">
    <a href="#" class="view-logs-link" (click)="openModal($event)">View logs</a>
  </ng-container>
</h3>
</div>

@zackcl
Copy link
Collaborator

zackcl commented May 21, 2024

OK, we discussed that we'll need a separate component for the Status Indicator and this component would probably expect an optional status with an Enum type.

@Yagnik56
Copy link
Collaborator Author

Yagnik56 commented May 22, 2024

@zackcl I think we shouldn't open the modal from the common component instead emit an event when viewLogs is clicked so it can be handled by the component that is calling that common component.

@danoswaltCL danoswaltCL merged commit 285c22c into dev May 29, 2024
8 checks passed
@danoswaltCL danoswaltCL deleted the feature/common-section-card-title-leftside-header branch May 29, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants