Skip to content

Commit 65f9706

Browse files
committed
feedback form, floating button
1 parent ee54760 commit 65f9706

14 files changed

+116
-10
lines changed

src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ <h3 class="center menuTitle">Menu</h3>
7272
<router-outlet></router-outlet>
7373
</div>
7474
<app-footer class="mat-elevation-z4"></app-footer>
75+
<app-floating-feedback></app-floating-feedback>
7576
</mat-sidenav-container>

src/app/app.module.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@ import { NoPageFoundComponent } from './error/no-page-found.component';
1919
import { SearchModule } from './shared/search/search.module';
2020
import { NewsService } from './shared/news/news.service';
2121
import { SafeHtmlPipe } from './shared/pipes/sanitize.pipe';
22+
import { FloatingFeedbackComponent } from './shared/floating-feedback/floating-feedback.component';
2223

2324
@NgModule({ declarations: [
2425
AppComponent,
2526
NavbarComponent,
2627
FooterComponent,
2728
NoPageFoundComponent,
28-
SafeHtmlPipe
29+
SafeHtmlPipe,
30+
FloatingFeedbackComponent
2931
],
30-
bootstrap: [AppComponent], imports: [BrowserModule,
32+
bootstrap: [AppComponent],
33+
imports: [BrowserModule,
3134
BrowserAnimationsModule,
3235
GlobalMaterialModules,
3336
ExtrasModule,
3437
RoutingModule,
35-
SearchModule], providers: [SearchService, NewsService, { provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } }, provideHttpClient(withInterceptorsFromDi())] })
38+
SearchModule],
39+
providers: [SearchService, NewsService,
40+
{ provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } },
41+
provideHttpClient(withInterceptorsFromDi())] })
3642
export class AppModule {
3743
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<a mat-fab
2+
color="secondary"
3+
routerLink="/feedback"
4+
matTooltip="Give Feedback"
5+
matTooltipPosition="left"
6+
class="feedback-fab"
7+
aria-label="Give Feedback">
8+
<mat-icon>feedback</mat-icon>
9+
</a>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:host {
2+
position: fixed;
3+
bottom: 24px;
4+
right: 24px;
5+
z-index: 1000;
6+
7+
}
8+
9+
.feedback-fab {
10+
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
11+
background-color: #ff4081;
12+
fill: white;
13+
color: white;
14+
&:hover {
15+
transform: scale(1.1);
16+
}
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-floating-feedback',
5+
templateUrl: './floating-feedback.component.html',
6+
styleUrls: ['./floating-feedback.component.scss']
7+
})
8+
export class FloatingFeedbackComponent {}

src/app/shared/footer/footer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<a href="https://www.jax.org/" target="__blank">
1515
<img class="footer-brand-larger" src="assets/jax_logo.png"/>
1616
</a>
17-
<a href="https://www.bihealth.org/" target="__blank">
17+
<a href="https://www.bihealth.org/" target="__blank" class="mr-4">
1818
<img class="footer-brand-larger" src="assets/bih-logo.svg"/>
1919
</a>
2020
</div>

src/app/shared/search/search/search.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<div class="result-title">
2424
Phenotypes - {{terms.length}} of {{termsCount}} displayed
2525
</div>
26-
<div class="result-list">
26+
<div class="result-list flex flex-column">
2727
<div class="result" (click)="closeDropDown()" routerLink="/browse/term/{{item.id}}"
2828
*ngFor="let item of terms;">
2929
<div class="name" *ngIf="!item.synonym" [innerHtml]="{name: item.name } | highlight: queryText"></div>
@@ -37,7 +37,7 @@
3737
<div class="result-title">
3838
Diseases - {{diseases.length}} of {{diseasesCount}} displayed
3939
</div>
40-
<div class="result-list">
40+
<div class="result-list flex flex-column">
4141
<div class="result" (click)="closeDropDown()" routerLink="/browse/disease/{{item.id}}"
4242
*ngFor="let item of diseases;">
4343
<div class="name" [innerHtml]="{name: item.name } | highlight: queryText"></div>
@@ -51,7 +51,7 @@
5151
<div class="result-title">
5252
Genes - {{genes.length}} of {{genesCount}} displayed
5353
</div>
54-
<div class="result-list">
54+
<div class="result-list flex flex-column">
5555
<div class="result" (click)="closeDropDown()" routerLink="/browse/gene/{{item.id}}"
5656
*ngFor="let item of genes;">
5757
<div class="name" [innerHtml]="{name: item.name } | highlight: queryText"></div>

src/app/shared/search/search/search.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ $orange-hover: rgba(236, 151, 54, 0.8);
4343
position: relative;
4444
z-index: 999;
4545
line-height: 20px;
46+
padding: .5rem;
4647

4748
& .search-all {
4849
padding: 2px 10px 0 10px;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="container">
2+
<div class="form-container">
3+
<iframe
4+
[src]="safeFormUrl"
5+
width="100%"
6+
height="800"
7+
frameborder="0"
8+
marginheight="0"
9+
marginwidth="0">
10+
Loading…
11+
</iframe>
12+
</div>
13+
</div>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.container {
2+
max-width: 900px;
3+
margin: 0 auto;
4+
padding: 20px;
5+
}
6+
7+
.pageTitle {
8+
margin-bottom: 16px;
9+
}
10+
11+
.description {
12+
color: #666;
13+
margin-bottom: 24px;
14+
}
15+
16+
.center {
17+
text-align: center;
18+
}
19+
20+
.form-container {
21+
display: flex;
22+
justify-content: center;
23+
height: 100%;
24+
25+
iframe {
26+
max-width: 100%;
27+
border: none;
28+
border-radius: 8px;
29+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
30+
}
31+
}

0 commit comments

Comments
 (0)