-
Notifications
You must be signed in to change notification settings - Fork 0
External links etc #198
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
External links etc #198
Changes from all commits
bf6df15
04c2542
0ef015d
deb5149
f2176af
bf32313
bd909a7
310bbd1
eb62ccf
9e59ba5
2c4c5dd
427e5e7
9085f05
02302fa
2fc03b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| <div style="margin-top: 12px"></div> | ||
|
|
||
| <mat-card-title> | ||
| <a class="card-title" [attr.href]="orgUnit.link ? orgUnit.link : null"> | ||
| <a class="card-title" tabindex="0" (keydown.enter)="orgUnit.link ? navigateTo(orgUnit.link) : null"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So here the title is clickable but does no action?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole card is clickable, so the title doesn't need to have the link - I realise this seems kind of odd, but the problem is that if the title does have the link then you get a new tab opening the link as well as the hub navigating to the link (double navigation). The keydown.enter is needed to navigate when the title is focused.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternative is that the external links open in the current tab, but this feels a bit weird to me? What do you think? I feel like we should keep the user on the ResearchHub and open links in new tabs. But maybe that's just my personal preference making me biased :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rosemcc An alternative, and possibly better, way to handle accessibility would be to make tabbing focus the whole card and then let aria-label read out the title of the card. Therefore the titles wouldn't need to be anchors any longer This works fine though |
||
| <span *ngIf="orgUnit.name">{{ orgUnit.name }}</span> | ||
| <span *ngIf="orgUnit.maoriName && orgUnit.name">, </span> | ||
| <span *ngIf="orgUnit.maoriName">{{ orgUnit.maoriName }}</span> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,13 +25,15 @@ | |
| contentItem.slug | ||
| ]" | ||
| > | ||
| {{ contentItem.title }} | ||
| <span>{{ contentItem.title }} | ||
| | ||
| <mat-icon *ngIf="contentItem.ssoProtected" matTooltip="SSO Login Required"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest we remove SSO - as this is not really necessary and might be confusing to some people
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might need to discuss with team? For users that don't have access I'd say it's needed so they can understand why they can't access this content. But we haven't collected specific user feedback about it so can't be sure.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cameronmclean what do you think? |
||
| lock | ||
| </mat-icon> | ||
| </span> | ||
| </a> | ||
| | ||
| <mat-icon *ngIf="contentItem.ssoProtected" matTooltip="SSO Login Required"> | ||
| lock | ||
| </mat-icon> | ||
| </mat-card-title> | ||
|
|
||
| <mat-card-content | ||
| ><span class="card-summary"> | ||
| <p>{{ contentItem.summary }}</p> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,8 @@ | |
| id="search" | ||
| #searchBox | ||
| type="search" | ||
| (keydown.enter)="search()" | ||
| #trigger="matAutocompleteTrigger" | ||
| (keydown.enter)="search(); trigger.closePanel()" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this! |
||
| placeholder="Search for anything" | ||
| [matAutocomplete]="auto" | ||
| [formControl]="searchText" | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why there are 2 URL fields in the first place, but this ternary expression existed before the refactor, therefore I kept it. Are you sure we can remove this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two url fields are because some documents are hosted on Contentful, and some are just linked to externally, and the respective urls are shown in different fields because of that.