-
Notifications
You must be signed in to change notification settings - Fork 22
Feat - Select Preprint Service Page #112
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
db49641
feat(submit-preprint-state): Implemented state for submit preprint
rrromchIk 14acced
feat(select-preprint-state): Implemented select service page with api…
rrromchIk 6d65b1b
feat(select-preprint-service): Enhance UI with dynamic translations
rrromchIk 4efc298
feat(select-preprint-service): Enhance UI with dynamic translations
rrromchIk c5d0ea5
Merge remote-tracking branch 'origin/feat/submit-preprint' into feat/…
rrromchIk 5bb72fb
fix(preprint-provider-hero): Added skeleton for search input while pr…
rrromchIk 0a358c7
fix(preprints-styles): Fixed styles due to merge conflicts
rrromchIk 70046df
Merge branch 'main' into feat/submit-preprint
rrromchIk 7a34b3c
feat(nav-menu): Added subroutes for preprints
rrromchIk 3bfc768
fix(preprints-search-input): Changed placeholder
rrromchIk f90c8c7
fix(comments): Fixed comments
rrromchIk 964f310
fix(preprints-help-dialog): Fixed url to help guide
rrromchIk 8aef899
feat(preprints-favicon): Implemented updating browser tab favicon and…
rrromchIk e4281a9
Merge branch 'main' into feat/submit-preprint
rrromchIk dffc84c
fix(select): remove duplicate style
rrromchIk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...p/features/preprints/pages/select-preprint-service/select-preprint-service.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| <osf-sub-header [title]="'preprints.selectService.title' | translate" /> | ||
|
|
||
| <section class="flex flex-1 flex-column bg-white p-3 md:p-4"> | ||
| <h2>{{ 'preprints.selectService.sectionTitle' | translate }}</h2> | ||
| <p class="m-t-12"> | ||
| <span> | ||
| {{ 'preprints.selectService.description' | translate }} | ||
| </span> | ||
| <a href="https://help.osf.io/article/376-preprints-home-page">{{ | ||
| 'preprints.selectService.learnMore' | translate | ||
| }}</a> | ||
| </p> | ||
| <section class="m-t-48 grid justify-content-center align-items-start gap-4"> | ||
| @if (areProvidersLoading()) { | ||
| @for (_ of skeletonArray; track $index) { | ||
| <p-card> | ||
| <div class="h-10rem w-13rem grid-item flex flex-column align-items-center justify-content-end"> | ||
| <p-skeleton width="60px" height="60px" /> | ||
| <p-skeleton class="m-t-12" width="5rem" height="1rem" /> | ||
| <p-skeleton class="m-t-24" width="8rem" height="2rem" /> | ||
| </div> | ||
| </p-card> | ||
| } | ||
| } @else { | ||
| @for (provider of preprintProvidersAllowingSubmissions(); track $index) { | ||
| <p-card | ||
| [ngClass]="{ active: selectedProviderId() === provider.id }" | ||
| [pTooltip]="descriptionTooltip" | ||
| tooltipPosition="bottom" | ||
| autoHide="false" | ||
| (click)="selectDeselectProvider(provider)" | ||
| > | ||
| <div class="h-10rem w-13rem grid-item flex flex-column align-items-center justify-content-end"> | ||
| @if (provider.squareColorNoTransparentImageUrl) { | ||
| <img height="60" [src]="provider.squareColorNoTransparentImageUrl" alt="Provider Logo" /> | ||
| } | ||
|
|
||
| <h4 class="m-t-12">{{ provider.name }}</h4> | ||
| <p-button | ||
| class="m-t-24" | ||
| [label]=" | ||
| selectedProviderId() === provider.id | ||
| ? ('preprints.selectService.buttons.deselect' | translate) | ||
| : ('preprints.selectService.buttons.select' | translate) | ||
| " | ||
| severity="secondary" | ||
| /> | ||
| </div> | ||
| </p-card> | ||
| <ng-template #descriptionTooltip> | ||
| <div [innerHTML]="provider.descriptionHtml | decodeHtml"></div> | ||
| </ng-template> | ||
| } | ||
| } | ||
| </section> | ||
| <section class="m-t-48 flex flex-row justify-content-end"> | ||
| <p-button | ||
| [label]="'preprints.selectService.buttons.next' | translate" | ||
| (click)="nextStep()" | ||
| [disabled]="!selectedProviderId()" | ||
| /> | ||
| </section> | ||
| </section> | ||
15 changes: 15 additions & 0 deletions
15
...p/features/preprints/pages/select-preprint-service/select-preprint-service.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| @use "assets/styles/mixins" as mix; | ||
| @use "assets/styles/variables" as var; | ||
rrromchIk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .grid-item { | ||
| width: mix.rem(260px); | ||
| height: mix.rem(200px); | ||
| } | ||
|
|
||
| .active, | ||
| p-card:hover { | ||
rrromchIk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --p-card-background: var(--bg-blue-3); | ||
| cursor: pointer; | ||
|
|
||
| --p-button-secondary-background: var(--white); | ||
| } | ||
22 changes: 22 additions & 0 deletions
22
...eatures/preprints/pages/select-preprint-service/select-preprint-service.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { SelectPreprintServiceComponent } from './select-preprint-service.component'; | ||
|
|
||
| describe('SelectPreprintServiceComponent', () => { | ||
| let component: SelectPreprintServiceComponent; | ||
| let fixture: ComponentFixture<SelectPreprintServiceComponent>; | ||
|
|
||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| imports: [SelectPreprintServiceComponent], | ||
| }).compileComponents(); | ||
|
|
||
| fixture = TestBed.createComponent(SelectPreprintServiceComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('should create', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.