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

feat: Add tab header "actions" #3293

Merged
merged 3 commits into from
Feb 17, 2025
Merged

feat: Add tab header "actions" #3293

merged 3 commits into from
Feb 17, 2025

Conversation

gethinwebster
Copy link
Member

Description

Add a slot for "actions", placed within the tabs header

Related links, issue #, if available: 4aAdA16jV0dV

How has this been tested?

New unit tests & permutations

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.42%. Comparing base (005def6) to head (1db7bd2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/tabs/tab-header-bar.tsx 77.77% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3293    +/-   ##
========================================
  Coverage   96.42%   96.42%            
========================================
  Files         791      791            
  Lines       22580    22583     +3     
  Branches     7794     7388   -406     
========================================
+ Hits        21772    21775     +3     
  Misses        801      801            
  Partials        7        7            

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

@gethinwebster gethinwebster marked this pull request as ready for review February 13, 2025 09:58
@gethinwebster gethinwebster requested a review from a team as a code owner February 13, 2025 09:58
@gethinwebster gethinwebster requested review from abdhalees and removed request for a team February 13, 2025 09:58
Copy link
Member

@abdhalees abdhalees left a comment

Choose a reason for hiding this comment

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

Looks good overall.

but this metrics prop could become confusing

hasActions: tabs.some(tab => !!tab.action),

I would initially think it refers to the header actions not a tab action, changing it would be a breaking change though, so adding a new metric prop hasHeaderActions could remove the confusion + it's useful anyway.

abdhalees
abdhalees previously approved these changes Feb 13, 2025
@gethinwebster
Copy link
Member Author

Note: codecov failing due to unrelated lines [indent change only]. The related functionality is heavily integ-tested as it's challenging to test in unit testing environment.

@gethinwebster gethinwebster added this pull request to the merge queue Feb 17, 2025
Merged via the queue into main with commit 66e818c Feb 17, 2025
37 of 38 checks passed
@gethinwebster gethinwebster deleted the tabs-actions branch February 17, 2025 16:43
georgylobko pushed a commit that referenced this pull request Feb 18, 2025
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.

2 participants