Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 532f55d

Browse files
feat: Activity links
I found it quite a bit distracting that I could not open activity detail in a new window - especially as filters on the matrix page do not persist on navigation. This changes the detail navigation from an onclick to a regular ol' HTML link, allowing "open in new window" etc.
1 parent 5087be3 commit 532f55d

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

‎package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"karma-jasmine-html-reporter": "~1.7.0",
6666
"prettier": "^2.7.1",
6767
"prettier-eslint": "^15.0.1",
68+
"qs": "^6.11.0",
6869
"typescript": "^4.6.4"
6970
},
7071
"browser": {

‎src/app/component/matrix/matrix.component.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@
3434
max-width: 9%;
3535
}
3636

37-
button {
38-
background-color: white;
39-
border: none;
40-
text-align: left;
41-
cursor: pointer;
42-
}
43-
4437
.tags-activity {
4538
font-weight: 800;
4639
font-style: italic;

‎src/app/component/matrix/matrix.component.html

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,23 @@
6363
<td mat-cell *matCellDef="let element">
6464
<ul>
6565
<li *ngFor="let activity of element[lvl]; index as j">
66-
<button
67-
style="margin-bottom: 1em"
68-
(click)="
69-
navigate(
70-
YamlObject[element.Dimension][element.SubDimension][activity].uuid,
71-
element.Dimension,
72-
element.SubDimension,
73-
i + 1,
74-
activity
75-
)
76-
">
66+
<div>
7767
<div>
7868
<p style="margin: 0">{{ activity }}</p>
7969
</div>
80-
<span class="tags-activity">
70+
<a
71+
href=" {{
72+
navigate(
73+
YamlObject[element.Dimension][element.SubDimension][
74+
activity
75+
].uuid,
76+
element.Dimension,
77+
element.SubDimension,
78+
i + 1,
79+
activity
80+
)
81+
}}"
82+
class="tags-activity">
8183
[
8284
<span
8385
*ngFor="
@@ -98,8 +100,8 @@
98100
</span>
99101
</span>
100102
]
101-
</span>
102-
</button>
103+
</a>
104+
</div>
103105
</li>
104106
</ul>
105107
</td>

‎src/app/component/matrix/matrix.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { map, startWith } from 'rxjs/operators';
66
import { MatTableDataSource } from '@angular/material/table';
77
import { ymlService } from '../../service/yaml-parser/yaml-parser.service';
88
import { Router, NavigationExtras } from '@angular/router';
9+
import { stringify } from "qs";
910

1011
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
1112

@@ -325,6 +326,6 @@ export class MatrixComponent implements OnInit {
325326
activityName: activityName,
326327
},
327328
};
328-
this.router.navigate([this.Routing],navigationExtras);
329+
return`${this.Routing}?${stringify(navigationExtras.queryParams)}`;
329330
}
330331
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /