Skip to content

Commit d27b76a

Browse files
authored
Merge pull request #117 from antigenomics/motif-popup-footer-hint
Evidence badges: add footer hint to Motif/Structure popups
2 parents 65c3e83 + 919b81e commit d27b76a

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

app/frontend/src/app/pages/search/table/search/entry/search-table-entry-info.component.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ interface BadgeInfo {
1313
popupLines: string[];
1414
popupHeader: string;
1515
link: string;
16+
footer?: string;
1617
}
1718

1819
@Component({
@@ -25,7 +26,7 @@ interface BadgeInfo {
2526
[style.background]="badge.color"
2627
[style.border-color]="badge.borderColor"
2728
[attr.href]="badge.link" target="_blank" rel="noopener"
28-
[popup]="badge.popupLines" [header]="badge.popupHeader"
29+
[popup]="badge.popupLines" [header]="badge.popupHeader" [footer]="badge.footer"
2930
topShift="-25" shiftStrategy="per-item" width="250" display="list">
3031
<span class="info-badge__letter">{{ badge.letter }}</span><span
3132
*ngIf="badge.subscript" class="info-badge__sub">{{ badge.subscript }}</span>
@@ -34,7 +35,7 @@ interface BadgeInfo {
3435
<span class="info-badge" [class.info-badge--inactive]="!badge.active"
3536
[style.background]="badge.color"
3637
[style.border-color]="badge.borderColor"
37-
[popup]="badge.popupLines" [header]="badge.popupHeader"
38+
[popup]="badge.popupLines" [header]="badge.popupHeader" [footer]="badge.footer"
3839
topShift="-25" shiftStrategy="per-item" width="250" display="list">
3940
<span class="info-badge__letter">{{ badge.letter }}</span><span
4041
*ngIf="badge.subscript" class="info-badge__sub">{{ badge.subscript }}</span>
@@ -152,7 +153,8 @@ export class SearchTableEntryInfoComponent extends TableEntry {
152153
active: true,
153154
popupLines: ['has_motif : +', `method : ${methodLabels.join(', ')}`, `cid : ${cid || '?'}`],
154155
popupHeader: 'Motif',
155-
link: link || ''
156+
link: link || '',
157+
footer: 'Click on the icon to open the motif page'
156158
};
157159
}
158160
return {
@@ -163,7 +165,8 @@ export class SearchTableEntryInfoComponent extends TableEntry {
163165
active: false,
164166
popupLines: ['has_motif : \u2013'],
165167
popupHeader: 'Motif',
166-
link: ''
168+
link: '',
169+
footer: 'No motif is available for this record'
167170
};
168171
}
169172

@@ -177,7 +180,8 @@ export class SearchTableEntryInfoComponent extends TableEntry {
177180
active: true,
178181
popupLines: popupLines || ['has_structure : +'],
179182
popupHeader: 'Structure',
180-
link: link || ''
183+
link: link || '',
184+
footer: link ? 'Click on the icon to open the structure page' : undefined
181185
};
182186
}
183187
return {
@@ -188,7 +192,8 @@ export class SearchTableEntryInfoComponent extends TableEntry {
188192
active: false,
189193
popupLines: ['has_structure : \u2013'],
190194
popupHeader: 'Structure',
191-
link: ''
195+
link: '',
196+
footer: 'No structure is available for this record'
192197
};
193198
}
194199

0 commit comments

Comments
 (0)