-
Notifications
You must be signed in to change notification settings - Fork 11
feat: expose replaceHistory option via navigable tab component #887
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 85.35% 85.36% +0.01%
==========================================
Files 801 801
Lines 16473 16472 -1
Branches 2067 2067
==========================================
+ Hits 14061 14062 +1
+ Misses 2380 2378 -2
Partials 32 32
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -57,7 +57,7 @@ export class NavigableTabGroupComponent implements AfterContentInit { | |||
}); | |||
|
|||
public onTabClick(tab: NavigableTabComponent): void { | |||
this.navigationService.navigateWithinApp([tab.path], this.activatedRoute); | |||
this.navigationService.navigateWithinApp([tab.path], this.activatedRoute, [], tab.replaceHistory); |
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.
did i accidentally forget to remove it? This function shouldn't be used. We need to add this option to the buildNavigationParams
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.
yep, this is nested inside an ht-link and should be deleted here and in the template
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.
@anandtiwary fixed this. Used ht-link in the component instead of hyperlink.
…ace/hypertrace-ui into replace-history-in-navigable-tab
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -14,17 +14,15 @@ import { NavigableTabComponent } from './navigable-tab.component'; | |||
<nav mat-tab-nav-bar *htLetAsync="this.activeTab$ as activeTab" disableRipple> | |||
<ng-container *ngFor="let tab of this.tabs"> | |||
<ng-container *ngIf="!tab.hidden"> | |||
<ht-link [paramsOrUrl]="buildNavigationParam | htMemoize: tab"> | |||
<div class="tab-button" *htIfFeature="tab.featureFlags | htFeature as featureState"> | |||
<a mat-tab-link (click)="this.onTabClick(tab)" class="tab-link" [active]="activeTab === tab"> |
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.
Are you sure it is still able to set active attribute for mat-tab link? This is why I had kept the ht-link outside the mat-tab-link.
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.
Yep. its setting active tab correctly.
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.
Nice. Thank you!
Description
expose replaceHistory option via navigable tab component