Unverified Commit 13aafac2 authored by bugclerk's avatar bugclerk Committed by GitHub
Browse files

NAS-124680 / 23.10.0 / Notes section on Apps page has issues showing full...

NAS-124680 / 23.10.0 / Notes section on Apps page has issues showing full contents - scrolling/expanding data not always available (by AlexKarpov98) (#9081)

* NAS-124680: Notes section on Apps page has issues showing full contents - scrolling/expanding data not always available

(cherry picked from commit 115034028d9d57868c6c732ca71c03992f053520)

* Revert "NAS-124680: Notes section on Apps page has issues showing full contents - scrolling/expanding data not always available"

This reverts commit 115034028d9d57868c6c732ca71c03992f053520.

(cherry picked from commit 5344383164a5c905345586f9fe237de46a662d5f)

* NAS-124680: PR update

(cherry picked from commit 1b63486871223a0260b7b6e810b06b69d5e0d250)

* NAS-124680: NAS_124680: PR update

(cherry picked from commit 46b9e0cea0a7cf692ebe40c65451f6cf6919a1a0)

---------
Co-authored-by: default avatarOleksandr Karpov <Karpov4you@gmail.com>
Showing with 9 additions and 8 deletions
+9 -8
......@@ -15,7 +15,7 @@
.more-less {
display: flex;
justify-content: center;
padding: 8px 0;
padding: 12px 0 0;
}
.gradient ~ .more-less {
......
import {
AfterContentInit,
AfterContentChecked,
Component, ElementRef, Input, OnChanges, ViewChild,
} from '@angular/core';
import { BehaviorSubject } from 'rxjs';
......@@ -9,7 +9,7 @@ import { BehaviorSubject } from 'rxjs';
templateUrl: './app-section-expand-collapse.component.html',
styleUrls: ['./app-section-expand-collapse.component.scss'],
})
export class AppSectionExpandCollapseComponent implements OnChanges, AfterContentInit {
export class AppSectionExpandCollapseComponent implements OnChanges, AfterContentChecked {
@ViewChild('section', { static: true, read: ElementRef }) section: ElementRef<HTMLElement>;
@Input() maxHeight = 250;
height$ = new BehaviorSubject<number>(this.maxHeight);
......@@ -24,9 +24,11 @@ export class AppSectionExpandCollapseComponent implements OnChanges, AfterConten
this.section.nativeElement.style.maxHeight = `${this.maxHeight}px`;
}
ngAfterContentInit(): void {
this.setHeight();
this.section.nativeElement.style.maxHeight = `${this.maxHeight}px`;
ngAfterContentChecked(): void {
if (this.isCollapsed) {
this.setHeight();
this.section.nativeElement.style.maxHeight = `${this.maxHeight}px`;
}
}
changeCollapsed(): void {
......
......@@ -3,7 +3,7 @@
<h3 mat-card-title>{{ 'Notes' | translate }}</h3>
</mat-card-header>
<mat-card-content>
<ix-app-section-expand-collapse class="notes" [maxHeight]="maxHeight">
<ix-app-section-expand-collapse class="notes">
<div class="notes-list">
<markdown [data]="app.info.notes"></markdown>
</div>
......
......@@ -9,5 +9,4 @@ import { ChartRelease } from 'app/interfaces/chart-release.interface';
})
export class AppNotesCardComponent {
@Input() app: ChartRelease;
@Input() maxHeight = 250;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment