From 3a10fec6e7b9662a3020d46dbeec0417abdd52cc Mon Sep 17 00:00:00 2001 From: nsemets Date: Sat, 20 Sep 2025 15:59:02 +0300 Subject: [PATCH 1/3] fix(bugs): fixed institutions and share bugs --- .../institutions-list.component.html | 8 -- .../institutions-list.component.ts | 91 +------------------ .../overview-toolbar.component.ts | 14 +-- .../overview/project-overview.component.html | 1 - .../overview/project-overview.component.ts | 1 + .../registry-overview.component.ts | 1 + .../shared/models/toolbar-resource.model.ts | 1 + .../shared/services/institutions.service.ts | 10 +- .../institutions/institutions.actions.ts | 6 +- .../stores/institutions/institutions.state.ts | 2 +- 10 files changed, 15 insertions(+), 120 deletions(-) diff --git a/src/app/features/institutions/pages/institutions-list/institutions-list.component.html b/src/app/features/institutions/pages/institutions-list/institutions-list.component.html index f568a5a69..18bad7056 100644 --- a/src/app/features/institutions/pages/institutions-list/institutions-list.component.html +++ b/src/app/features/institutions/pages/institutions-list/institutions-list.component.html @@ -28,14 +28,6 @@

{{ institution.name }}

{{ 'common.search.noResultsFound' | translate }}

} - - @if (totalInstitutionsCount() > currentPageSize()) { - - } } diff --git a/src/app/features/institutions/pages/institutions-list/institutions-list.component.ts b/src/app/features/institutions/pages/institutions-list/institutions-list.component.ts index 6314795a1..d02cb08c3 100644 --- a/src/app/features/institutions/pages/institutions-list/institutions-list.component.ts +++ b/src/app/features/institutions/pages/institutions-list/institutions-list.component.ts @@ -2,34 +2,15 @@ import { createDispatchMap, select } from '@ngxs/store'; import { TranslatePipe } from '@ngx-translate/core'; -import { PaginatorState } from 'primeng/paginator'; - import { debounceTime, distinctUntilChanged } from 'rxjs'; import { NgOptimizedImage } from '@angular/common'; -import { - ChangeDetectionStrategy, - Component, - DestroyRef, - effect, - HostBinding, - inject, - signal, - untracked, -} from '@angular/core'; -import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop'; +import { ChangeDetectionStrategy, Component, DestroyRef, HostBinding, inject } from '@angular/core'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormControl } from '@angular/forms'; import { ActivatedRoute, Router, RouterLink } from '@angular/router'; -import { - CustomPaginatorComponent, - LoadingSpinnerComponent, - SearchInputComponent, - SubHeaderComponent, -} from '@osf/shared/components'; -import { DEFAULT_TABLE_PARAMS } from '@osf/shared/constants'; -import { parseQueryFilterParams } from '@osf/shared/helpers'; -import { QueryParams } from '@osf/shared/models'; +import { LoadingSpinnerComponent, SearchInputComponent, SubHeaderComponent } from '@osf/shared/components'; import { FetchInstitutions, InstitutionsSelectors } from '@osf/shared/stores'; @Component({ @@ -39,7 +20,6 @@ import { FetchInstitutions, InstitutionsSelectors } from '@osf/shared/stores'; TranslatePipe, SearchInputComponent, NgOptimizedImage, - CustomPaginatorComponent, LoadingSpinnerComponent, RouterLink, ], @@ -57,78 +37,17 @@ export class InstitutionsListComponent { searchControl = new FormControl(''); - queryParams = toSignal(this.route.queryParams); - currentPage = signal(1); - currentPageSize = signal(DEFAULT_TABLE_PARAMS.rows); - first = signal(0); - institutions = select(InstitutionsSelectors.getInstitutions); - totalInstitutionsCount = select(InstitutionsSelectors.getInstitutionsTotalCount); institutionsLoading = select(InstitutionsSelectors.isInstitutionsLoading); constructor() { - this.setupQueryParamsEffect(); + this.actions.getInstitutions(); this.setupSearchSubscription(); } - onPageChange(event: PaginatorState): void { - this.currentPage.set(event.page ? this.currentPage() + 1 : 1); - this.first.set(event.first ?? 0); - this.updateQueryParams({ - page: this.currentPage(), - size: event.rows, - }); - } - - private setupQueryParamsEffect(): void { - effect(() => { - const rawQueryParams = this.queryParams(); - if (!rawQueryParams) return; - - const parsedQueryParams = parseQueryFilterParams(rawQueryParams); - - this.updateComponentState(parsedQueryParams); - - this.actions.getInstitutions(parsedQueryParams.page, parsedQueryParams.size, parsedQueryParams.search); - }); - } - - private updateQueryParams(updates: Partial): void { - const queryParams: Record = {}; - - if ('page' in updates) { - queryParams['page'] = updates.page!.toString(); - } - if ('size' in updates) { - queryParams['size'] = updates.size!.toString(); - } - if ('search' in updates) { - queryParams['search'] = updates.search || undefined; - } - - this.router.navigate([], { - relativeTo: this.route, - queryParams, - queryParamsHandling: 'merge', - }); - } - private setupSearchSubscription(): void { this.searchControl.valueChanges .pipe(debounceTime(300), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)) - .subscribe((searchControl) => { - this.updateQueryParams({ - search: searchControl ?? '', - page: 1, - }); - }); - } - - private updateComponentState(params: QueryParams): void { - untracked(() => { - this.currentPage.set(params.page); - this.currentPageSize.set(params.size); - this.searchControl.setValue(params.search); - }); + .subscribe((searchControl) => this.actions.getInstitutions(searchControl ?? '')); } } diff --git a/src/app/features/project/overview/components/overview-toolbar/overview-toolbar.component.ts b/src/app/features/project/overview/components/overview-toolbar/overview-toolbar.component.ts index e12149d21..c7f3b132d 100644 --- a/src/app/features/project/overview/components/overview-toolbar/overview-toolbar.component.ts +++ b/src/app/features/project/overview/components/overview-toolbar/overview-toolbar.component.ts @@ -70,7 +70,6 @@ export class OverviewToolbarComponent { isCollectionsRoute = input(false); isAdmin = input.required(); currentResource = input.required(); - projectTitle = input(''); projectDescription = input(''); showViewOnlyLinks = input(true); @@ -84,13 +83,9 @@ export class OverviewToolbarComponent { return shareableContent ? this.buildSocialActionItems(shareableContent) : []; }); - hasViewOnly = computed(() => { - return hasViewOnlyParam(this.router); - }); + hasViewOnly = computed(() => hasViewOnlyParam(this.router)); - actions = createDispatchMap({ - clearDuplicatedProject: ClearDuplicatedProject, - }); + actions = createDispatchMap({ clearDuplicatedProject: ClearDuplicatedProject }); readonly forkActionItems = [ { @@ -250,16 +245,15 @@ export class OverviewToolbarComponent { private createShareableContent(): ShareableContent | null { const resource = this.currentResource(); - const title = this.projectTitle(); const description = this.projectDescription(); - if (!resource?.isPublic || !title) { + if (!resource?.isPublic) { return null; } return { id: resource.id, - title, + title: resource.title, description, url: this.buildResourceUrl(resource), }; diff --git a/src/app/features/project/overview/project-overview.component.html b/src/app/features/project/overview/project-overview.component.html index 39dae20c9..4ea68a02b 100644 --- a/src/app/features/project/overview/project-overview.component.html +++ b/src/app/features/project/overview/project-overview.component.html @@ -16,7 +16,6 @@ diff --git a/src/app/features/project/overview/project-overview.component.ts b/src/app/features/project/overview/project-overview.component.ts index d1c39fdce..044a76399 100644 --- a/src/app/features/project/overview/project-overview.component.ts +++ b/src/app/features/project/overview/project-overview.component.ts @@ -206,6 +206,7 @@ export class ProjectOverviewComponent implements OnInit { if (project) { return { id: project.id, + title: project.title, isPublic: project.isPublic, storage: project.storage, viewOnlyLinksCount: project.viewOnlyLinksCount, diff --git a/src/app/features/registry/pages/registry-overview/registry-overview.component.ts b/src/app/features/registry/pages/registry-overview/registry-overview.component.ts index a74172767..d9158ce02 100644 --- a/src/app/features/registry/pages/registry-overview/registry-overview.component.ts +++ b/src/app/features/registry/pages/registry-overview/registry-overview.component.ts @@ -149,6 +149,7 @@ export class RegistryOverviewComponent { if (this.registry()) { return { id: this.registry()!.id, + title: this.registry()?.title, isPublic: this.registry()!.isPublic, storage: undefined, viewOnlyLinksCount: 0, diff --git a/src/app/shared/models/toolbar-resource.model.ts b/src/app/shared/models/toolbar-resource.model.ts index a1a2d958c..dd3f5b108 100644 --- a/src/app/shared/models/toolbar-resource.model.ts +++ b/src/app/shared/models/toolbar-resource.model.ts @@ -2,6 +2,7 @@ import { ResourceType } from '@shared/enums'; export interface ToolbarResource { id: string; + title: string; isPublic: boolean; storage?: { id: string; diff --git a/src/app/shared/services/institutions.service.ts b/src/app/shared/services/institutions.service.ts index be204138b..6669a9d37 100644 --- a/src/app/shared/services/institutions.service.ts +++ b/src/app/shared/services/institutions.service.ts @@ -35,17 +35,9 @@ export class InstitutionsService { [ResourceType.DraftRegistration, 'draft_registrations'], ]); - getInstitutions(pageNumber: number, pageSize: number, searchValue?: string): Observable { + getInstitutions(searchValue?: string): Observable { const params: Record = {}; - if (pageNumber) { - params['page'] = pageNumber; - } - - if (pageSize) { - params['page[size]'] = pageSize; - } - if (searchValue && searchValue.trim()) { params['filter[name]'] = searchValue.trim(); } diff --git a/src/app/shared/stores/institutions/institutions.actions.ts b/src/app/shared/stores/institutions/institutions.actions.ts index 8e359a433..2d05bfd44 100644 --- a/src/app/shared/stores/institutions/institutions.actions.ts +++ b/src/app/shared/stores/institutions/institutions.actions.ts @@ -8,11 +8,7 @@ export class FetchUserInstitutions { export class FetchInstitutions { static readonly type = '[Institutions] Fetch Institutions'; - constructor( - public pageNumber: number, - public pageSize: number, - public searchValue?: string - ) {} + constructor(public searchValue?: string) {} } export class FetchResourceInstitutions { diff --git a/src/app/shared/stores/institutions/institutions.state.ts b/src/app/shared/stores/institutions/institutions.state.ts index 0d892891b..b88b8c7f4 100644 --- a/src/app/shared/stores/institutions/institutions.state.ts +++ b/src/app/shared/stores/institutions/institutions.state.ts @@ -54,7 +54,7 @@ export class InstitutionsState { }, }); - return this.institutionsService.getInstitutions(action.pageNumber, action.pageSize, action.searchValue).pipe( + return this.institutionsService.getInstitutions(action.searchValue).pipe( tap((response) => { ctx.setState( patch({ From da9286fba64ae1ef0b5f8b00cb84f33e1a234959 Mon Sep 17 00:00:00 2001 From: nsemets Date: Sat, 20 Sep 2025 22:16:53 +0300 Subject: [PATCH 2/3] fix(wiki): fixed wiki bugs --- .../contributors/contributors.component.html | 5 +-- .../contributors/contributors.component.ts | 7 +++- .../overview-wiki.component.html | 9 +++-- .../overview-wiki/overview-wiki.component.ts | 12 ++++--- .../overview/project-overview.component.html | 2 +- .../truncated-text.component.html | 33 +++++-------------- .../truncated-text.component.scss | 4 --- .../truncated-text.component.spec.ts | 31 ++--------------- .../truncated-text.component.ts | 31 ++++++++++++++--- src/assets/i18n/en.json | 3 +- 10 files changed, 61 insertions(+), 76 deletions(-) diff --git a/src/app/features/project/contributors/contributors.component.html b/src/app/features/project/contributors/contributors.component.html index caa3a6c66..058c25eb1 100644 --- a/src/app/features/project/contributors/contributors.component.html +++ b/src/app/features/project/contributors/contributors.component.html @@ -11,10 +11,7 @@

{{ 'navigation.contributors' | translate }
- +
diff --git a/src/app/features/project/contributors/contributors.component.ts b/src/app/features/project/contributors/contributors.component.ts index 19bc22034..0cfc2beb0 100644 --- a/src/app/features/project/contributors/contributors.component.ts +++ b/src/app/features/project/contributors/contributors.component.ts @@ -31,7 +31,7 @@ import { ContributorsListComponent, } from '@osf/shared/components/contributors'; import { BIBLIOGRAPHY_OPTIONS, PERMISSION_OPTIONS } from '@osf/shared/constants'; -import { AddContributorType, ContributorPermission } from '@osf/shared/enums'; +import { AddContributorType, ContributorPermission, ResourceType } from '@osf/shared/enums'; import { findChangedItems } from '@osf/shared/helpers'; import { ContributorDialogAddModel, @@ -109,6 +109,11 @@ export class ContributorsComponent implements OnInit { readonly currentUser = select(UserSelectors.getCurrentUser); canCreateViewLink = computed(() => !!this.resourceDetails() && !!this.resourceId()); + searchPlaceholder = computed(() => + this.resourceType() === ResourceType.Project + ? 'project.contributors.searchProjectPlaceholder' + : 'project.contributors.searchRegistrationPlaceholder' + ); isCurrentUserAdminContributor = computed(() => { const currentUserId = this.currentUser()?.id; diff --git a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.html b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.html index 84fc750cf..2e3eab108 100644 --- a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.html +++ b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.html @@ -4,9 +4,12 @@

{{ 'project.overview.wiki.title' | translate }}

} @else { @if (wikiContent()) { - - - + } @else {
} diff --git a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts index 361572974..3f3c0daff 100644 --- a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts +++ b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts @@ -4,14 +4,14 @@ import { TranslatePipe } from '@ngx-translate/core'; import { Skeleton } from 'primeng/skeleton'; -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component, input } from '@angular/core'; -import { MarkdownComponent, TruncatedTextComponent } from '@osf/shared/components'; +import { TruncatedTextComponent } from '@osf/shared/components'; import { WikiSelectors } from '@osf/shared/stores'; @Component({ - selector: 'osf-project-wiki', - imports: [Skeleton, TranslatePipe, TruncatedTextComponent, MarkdownComponent], + selector: 'osf-overview-wiki', + imports: [Skeleton, TranslatePipe, TruncatedTextComponent], templateUrl: './overview-wiki.component.html', styleUrl: './overview-wiki.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, @@ -19,4 +19,8 @@ import { WikiSelectors } from '@osf/shared/stores'; export class OverviewWikiComponent { isWikiLoading = select(WikiSelectors.getHomeWikiLoading); wikiContent = select(WikiSelectors.getHomeWikiContent); + + resourceId = input(''); + + wikiLink = () => ['/', this.resourceId(), 'wiki']; } diff --git a/src/app/features/project/overview/project-overview.component.html b/src/app/features/project/overview/project-overview.component.html index 4ea68a02b..94f073a22 100644 --- a/src/app/features/project/overview/project-overview.component.html +++ b/src/app/features/project/overview/project-overview.component.html @@ -74,7 +74,7 @@
@if (isAdmin || canWrite) { - + } - @if (hasContent()) { -
- -
- } @else { -
- } +
@if (hasOverflowingText()) { - - {{ isTextExpanded() ? ('truncatedText.hide' | translate) : ('truncatedText.readMore' | translate) }} - + }
diff --git a/src/app/shared/components/truncated-text/truncated-text.component.scss b/src/app/shared/components/truncated-text/truncated-text.component.scss index 4b46cf06c..bb473e7e9 100644 --- a/src/app/shared/components/truncated-text/truncated-text.component.scss +++ b/src/app/shared/components/truncated-text/truncated-text.component.scss @@ -17,7 +17,3 @@ line-clamp: initial; } } - -.read-more-link { - cursor: pointer; -} diff --git a/src/app/shared/components/truncated-text/truncated-text.component.spec.ts b/src/app/shared/components/truncated-text/truncated-text.component.spec.ts index eb4f0eb2a..0c5fc125c 100644 --- a/src/app/shared/components/truncated-text/truncated-text.component.spec.ts +++ b/src/app/shared/components/truncated-text/truncated-text.component.spec.ts @@ -1,7 +1,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { TruncatedTextComponent } from '@shared/components'; -import { TranslateServiceMock } from '@shared/mocks'; +import { TranslateServiceMock } from '@osf/shared/mocks'; + +import { TruncatedTextComponent } from './truncated-text.component'; describe('TruncatedTextComponent', () => { let component: TruncatedTextComponent; @@ -26,29 +27,11 @@ describe('TruncatedTextComponent', () => { expect(component.text()).toBe('Test text content'); }); - it('should set hasContent input correctly', () => { - fixture.componentRef.setInput('hasContent', true); - expect(component.hasContent()).toBe(true); - }); - it('should set maxVisibleLines input correctly', () => { fixture.componentRef.setInput('maxVisibleLines', 5); expect(component.maxVisibleLines()).toBe(5); }); - it('should toggle isTextExpanded from false to true', () => { - expect(component['isTextExpanded']()).toBe(false); - component['toggleTextExpansion'](); - expect(component['isTextExpanded']()).toBe(true); - }); - - it('should toggle isTextExpanded from true to false', () => { - component['isTextExpanded'].set(true); - expect(component['isTextExpanded']()).toBe(true); - component['toggleTextExpansion'](); - expect(component['isTextExpanded']()).toBe(false); - }); - it('should call checkTextOverflow in ngAfterViewInit', () => { const checkTextOverflowSpy = jest.spyOn(component as any, 'checkTextOverflow'); @@ -62,14 +45,6 @@ describe('TruncatedTextComponent', () => { expect(component.text()).toBe(''); }); - it('should handle different hasContent values', () => { - fixture.componentRef.setInput('hasContent', true); - expect(component.hasContent()).toBe(true); - - fixture.componentRef.setInput('hasContent', false); - expect(component.hasContent()).toBe(false); - }); - it('should handle different maxVisibleLines values', () => { const values = [1, 2, 3, 5, 10, 100]; diff --git a/src/app/shared/components/truncated-text/truncated-text.component.ts b/src/app/shared/components/truncated-text/truncated-text.component.ts index f084f7479..9b4b09b77 100644 --- a/src/app/shared/components/truncated-text/truncated-text.component.ts +++ b/src/app/shared/components/truncated-text/truncated-text.component.ts @@ -1,22 +1,39 @@ import { TranslatePipe } from '@ngx-translate/core'; +import { Button } from 'primeng/button'; + import { CommonModule } from '@angular/common'; -import { AfterViewInit, Component, effect, ElementRef, input, signal, viewChild } from '@angular/core'; +import { AfterViewInit, Component, effect, ElementRef, inject, input, signal, viewChild } from '@angular/core'; +import { Router } from '@angular/router'; @Component({ selector: 'osf-truncated-text', templateUrl: './truncated-text.component.html', styleUrls: ['./truncated-text.component.scss'], - imports: [CommonModule, TranslatePipe], + imports: [CommonModule, TranslatePipe, Button], }) export class TruncatedTextComponent implements AfterViewInit { readonly text = input(''); - readonly hasContent = input(false); readonly maxVisibleLines = input(3); + readonly navigateOnReadMore = input(false); + readonly link = input([]); + readonly readMoreLabel = input('truncatedText.readMore'); + readonly hideLabel = input('truncatedText.hide'); readonly contentElement = viewChild('textContent'); + + private readonly router = inject(Router); + isTextExpanded = signal(false); hasOverflowingText = signal(false); + buttonLabel = () => { + if (this.navigateOnReadMore()) { + return this.readMoreLabel(); + } + + return this.isTextExpanded() ? this.hideLabel() : this.readMoreLabel(); + }; + constructor() { effect(() => { if (this.text()) { @@ -37,7 +54,11 @@ export class TruncatedTextComponent implements AfterViewInit { this.hasOverflowingText.set(hasOverflow); } - toggleTextExpansion(): void { - this.isTextExpanded.update((expanded) => !expanded); + handleButtonClick(): void { + if (this.navigateOnReadMore()) { + this.router.navigate(this.link()); + } else { + this.isTextExpanded.update((expanded) => !expanded); + } } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index c74dab042..f3b56e070 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -534,7 +534,8 @@ }, "contributors": { "addContributor": "Add Contributor", - "searchPlaceholder": "Search contributors", + "searchProjectPlaceholder": "Search Project Contributors", + "searchRegistrationPlaceholder": "Search Registration Contributors", "permissionFilter": "Filter by permission", "bibliographyFilter": "Bibliography", "permissions": { From 82d645df7c019430c24d5ae9acae16f8248776b1 Mon Sep 17 00:00:00 2001 From: nsemets Date: Mon, 22 Sep 2025 10:38:57 +0300 Subject: [PATCH 3/3] fix(truncated-text): fixed truncated text and styles --- .../scheduled-banner.component.html | 2 +- .../scheduled-banner.component.scss | 3 --- .../overview-wiki/overview-wiki.component.html | 5 ++++- .../overview-wiki/overview-wiki.component.ts | 4 ++-- .../truncated-text/truncated-text.component.html | 14 +++++++------- .../truncated-text/truncated-text.component.ts | 1 + src/styles/_base.scss | 8 ++++---- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/app/core/components/osf-banners/scheduled-banner/scheduled-banner.component.html b/src/app/core/components/osf-banners/scheduled-banner/scheduled-banner.component.html index cd7b9d40c..3037dde30 100644 --- a/src/app/core/components/osf-banners/scheduled-banner/scheduled-banner.component.html +++ b/src/app/core/components/osf-banners/scheduled-banner/scheduled-banner.component.html @@ -4,7 +4,7 @@ [style.background-color]="currentBanner()?.color" class="flex w-full justify-content-center align-items flex-row" > - + {{ 'project.overview.wiki.title' | translate }}

[maxVisibleLines]="12" [navigateOnReadMore]="true" [link]="wikiLink()" - /> + [hasOwnContent]="true" + > + + } @else {
} diff --git a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts index 3f3c0daff..186c87cd3 100644 --- a/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts +++ b/src/app/features/project/overview/components/overview-wiki/overview-wiki.component.ts @@ -6,12 +6,12 @@ import { Skeleton } from 'primeng/skeleton'; import { ChangeDetectionStrategy, Component, input } from '@angular/core'; -import { TruncatedTextComponent } from '@osf/shared/components'; +import { MarkdownComponent, TruncatedTextComponent } from '@osf/shared/components'; import { WikiSelectors } from '@osf/shared/stores'; @Component({ selector: 'osf-overview-wiki', - imports: [Skeleton, TranslatePipe, TruncatedTextComponent], + imports: [Skeleton, TranslatePipe, TruncatedTextComponent, MarkdownComponent], templateUrl: './overview-wiki.component.html', styleUrl: './overview-wiki.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/shared/components/truncated-text/truncated-text.component.html b/src/app/shared/components/truncated-text/truncated-text.component.html index 41f9f2484..feb46c270 100644 --- a/src/app/shared/components/truncated-text/truncated-text.component.html +++ b/src/app/shared/components/truncated-text/truncated-text.component.html @@ -1,11 +1,11 @@
-
+
+ @if (hasOwnContent()) { + + } @else { +
+ } +
@if (hasOverflowingText()) { diff --git a/src/app/shared/components/truncated-text/truncated-text.component.ts b/src/app/shared/components/truncated-text/truncated-text.component.ts index 9b4b09b77..dce11c821 100644 --- a/src/app/shared/components/truncated-text/truncated-text.component.ts +++ b/src/app/shared/components/truncated-text/truncated-text.component.ts @@ -17,6 +17,7 @@ export class TruncatedTextComponent implements AfterViewInit { readonly maxVisibleLines = input(3); readonly navigateOnReadMore = input(false); readonly link = input([]); + readonly hasOwnContent = input(false); readonly readMoreLabel = input('truncatedText.readMore'); readonly hideLabel = input('truncatedText.hide'); readonly contentElement = viewChild('textContent'); diff --git a/src/styles/_base.scss b/src/styles/_base.scss index 02de09bae..20e683fad 100644 --- a/src/styles/_base.scss +++ b/src/styles/_base.scss @@ -12,8 +12,8 @@ html, body { - color: var.$dark-blue-1; - font-family: var.$openSans; + color: var(--dark-blue-1); + font-family: var(--openSans); font-weight: 400; font-size: var.$base-font-size; max-height: 100vh; @@ -47,7 +47,7 @@ h3 { font-weight: 700; text-transform: capitalize; - color: var.$dark-blue-1; + color: var(--dark-blue-1); } li { @@ -57,7 +57,7 @@ a, a:visited { text-decoration: none; - color: var.$pr-blue-1; + color: var(--pr-blue-1); } a:hover {