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

refactor: simplify a bit tabs component prior to signals migration #887

Conversation

davidlj95
Copy link
Owner

No description provided.

@davidlj95 davidlj95 enabled auto-merge (squash) November 28, 2024 13:55
Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@@ -38,7 +38,7 @@ export class TabsComponent implements OnDestroy {
})

// Pagination
private _tabList = viewChild<ElementRef<HTMLElement>>('tabList')
private _tabList = viewChild.required<ElementRef<HTMLElement>>('tabList')
Copy link
Owner Author

Choose a reason for hiding this comment

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

This way no need to check for not defined

this._currentTabs.length === 0 ||
(this._selectedIndex !== undefined &&
Copy link
Owner Author

Choose a reason for hiding this comment

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

if selected index is undefined, it won't match index to select due to first condition in this if clause

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.18%. Comparing base (e5b170e) to head (611e62b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #887      +/-   ##
==========================================
+ Coverage   96.03%   96.18%   +0.15%     
==========================================
  Files         124      124              
  Lines         630      629       -1     
  Branches       70       70              
==========================================
  Hits          605      605              
  Misses         19       19              
+ Partials        6        5       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidlj95 davidlj95 merged commit 0cdc8d9 into main Nov 28, 2024
15 checks passed
@davidlj95 davidlj95 deleted the stacked/refactor-simplify-a-bit-tabs-component-prior-to-signals-migration branch November 28, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant