Skip to content

Commit

Permalink
Merge branch 'main' into FixSortOptionsForWorks
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro authored Feb 19, 2024
2 parents c056a2c + 0d70e7c commit e2e25a9
Show file tree
Hide file tree
Showing 55 changed files with 1,155 additions and 312 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## v2.55.11 - 2024-02-16

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.10...v2.55.11)

## v2.55.10 - 2024-02-16

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.9...v2.55.10)

## v2.55.9 - 2024-02-15

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.8...v2.55.9)

## v2.55.8 - 2024-02-15

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.7...v2.55.8)

## v2.55.7 - 2024-02-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.6...v2.55.7)

## v2.55.6 - 2024-02-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.5...v2.55.6)

## v2.55.5 - 2024-02-12

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.4...v2.55.5)

## v2.55.4 - 2024-02-08

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.55.3...v2.55.4)
Expand Down
17 changes: 16 additions & 1 deletion src/app/cdk/side-bar/side-bar/side-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,26 @@
>
<h2
class="orc-font-body-large"
[ngClass]="{ 'sr-only': isPublicRecord ? !newRecordHeaderTogglz : true }"
[ngClass]="{
'sr-only':
!loadingUserRecord && isPublicRecord ? !newRecordHeaderTogglz : true
}"
i18n="@@shared.personalInformation"
>
Personal information
</h2>
<p
i18n="@@record.noPersonalInformation"
*ngIf="
!loadingUserRecord && isPublicRecord
? newRecordHeaderTogglz
? !displaySideBar
: false
: false
"
>
No personal information available
</p>
<ng-container *ngIf="isPublicRecord ? !newRecordHeaderTogglz : true">
<app-side-bar-id
*ngIf="!hideOrcidId"
Expand Down
8 changes: 4 additions & 4 deletions src/app/cdk/side-bar/side-bar/side-bar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
> div {
width: 100%;
}

h2 {
margin: 0;
}
}

section {
Expand All @@ -15,10 +19,6 @@ app-panel {
margin-top: 16px;
}

app-panel:first-of-type {
margin-top: 32px;
}

.orc-font-body {
margin: unset;
}
Expand Down
25 changes: 24 additions & 1 deletion src/app/cdk/side-bar/side-bar/side-bar.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core'
import {
Component,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
} from '@angular/core'
import { Subject } from 'rxjs'
import { takeUntil } from 'rxjs/operators'
import { UserService } from 'src/app/core'
Expand All @@ -19,6 +26,7 @@ import { ModalKeywordComponent } from '../modals/modal-keyword/modal-keyword.com
import { ModalPersonIdentifiersComponent } from '../modals/modal-person-identifiers/modal-person-identifiers.component'
import { ModalWebsitesComponent } from '../modals/modal-websites/modal-websites.component'
import { ActivatedRoute } from '@angular/router'
import { RecordUtil } from 'src/app/shared/utils/record.util'

@Component({
selector: 'app-side-bar',
Expand All @@ -37,17 +45,22 @@ export class SideBarComponent implements OnInit, OnDestroy {

$destroy: Subject<boolean> = new Subject<boolean>()

@Output() isSideBarEmpty: EventEmitter<any> = new EventEmitter()

@Input() isPublicRecord: string
@Input() orcidId = false
@Input() hideOrcidId = false
@Input() newRecordHeaderTogglz: boolean
@Input() loadingUserRecord: boolean

modalCountryComponent = ModalCountryComponent
modalEmailComponent = ModalEmailComponent
modalWebsitesComponent = ModalWebsitesComponent
modalKeywordComponent = ModalKeywordComponent
modalPersonalIdentifiers = ModalPersonIdentifiersComponent

displaySideBar: boolean

userSession: {
userInfo: UserInfo
nameForm: NameForm
Expand Down Expand Up @@ -113,6 +126,8 @@ export class SideBarComponent implements OnInit, OnDestroy {
}
this.userRecord = userRecord
this.userInfo = userRecord?.userInfo

this.onSideBarElementsDisplay(userRecord)
})
}

Expand All @@ -138,6 +153,14 @@ export class SideBarComponent implements OnInit, OnDestroy {
})
}

onSideBarElementsDisplay(userRecord: UserRecord): void {
this.displaySideBar = RecordUtil.isSideBarEmpty(
!!this.isPublicRecord,
userRecord
)
this.isSideBarEmpty.emit(this.displaySideBar)
}

ngOnDestroy() {
this.$destroy.next(true)
this.$destroy.unsubscribe()
Expand Down
Loading

0 comments on commit e2e25a9

Please sign in to comment.