Skip to content
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

chore[1300]: added back Button #1350

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha

### Added
- #908 Add owner field to affected parts view in notification details
- #1300 Added back button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- #1300 Added back button
- #1300 Added back button to fullscreen part tree viewer


### Changed
- #1252 adapt IRS example response for integration tests to reflect current state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@

SPDX-License-Identifier: Apache-2.0
-->
<div class="part-relation--header--navigation--container" *ngIf="showMiniMap">
<app-button
[color]="'primary'"
onkeydown="this.navigateBack()"
(click)="this.navigateBack()"
>
<div class="flex justify-between items-center">
<mat-icon class="mr-2">arrow_back</mat-icon>
{{ 'actions.goBack' | i18n }}
</div>
</app-button>
</div>

<ng-container *ngIf="this.rootPart$">
<ng-container *viewContainer="this.rootPart$ | async; main: partRelationMainTmp; error: errorTmp; loading: loaderTmp">
</ng-container>
</ng-container>

<ng-template #partRelationMainTmp let-partDetails="view">
<div class="part-relation--button-container">
<app-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
right: 0;
}

.part-relation--header--navigation--container {
position: absolute;
top: 10px;
left: 10px;
z-index: 1000;
}

.part-relation--button-container {
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { Location } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Expand Down Expand Up @@ -57,14 +58,14 @@ export class PartRelationComponent implements OnInit, OnDestroy {
public readonly rootPart$: Observable<View<Part>>;
public readonly resizeTrigger$: Observable<number>;
public readonly htmlId: string;

private _rootPart$ = new State<View<Part>>({ loader: true });
public readonly _resizeTrigger$ = new BehaviorSubject<number>(0);

constructor(
private readonly partDetailsFacade: PartDetailsFacade,
private readonly route: ActivatedRoute,
private readonly cdr: ChangeDetectorRef,
private readonly location: Location,
staticIdService: StaticIdService,
) {
this.resizeTrigger$ = this._resizeTrigger$.pipe(delay(0));
Expand Down Expand Up @@ -99,4 +100,8 @@ export class PartRelationComponent implements OnInit, OnDestroy {
public decreaseSize(): void {
this._resizeTrigger$.next(-0.1);
}

navigateBack() {
this.location.back();
}
}
Loading