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(tab): adds closable attribute and close event (VIV-2030) #1915

Merged
merged 25 commits into from
Oct 2, 2024

Conversation

TaylorJ76
Copy link
Contributor

No description provided.

@TaylorJ76 TaylorJ76 changed the title Viv 2030 closable tab feat(tab): adds closable attribute and close event (VIV-2030) Sep 24, 2024
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d61b119) to head (3a8e6ad).
Report is 1085 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1915     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files          123       349    +226     
  Lines         1562      6773   +5211     
  Branches       108       869    +761     
===========================================
+ Hits          1562      6773   +5211     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@rachelbt rachelbt left a comment

Choose a reason for hiding this comment

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

didn't went over all the code yet, tested keyboad navigation and screen-reader and its not 100%.
When tab is removed (also - there's no way to know it is removable), the focus disappears, shouldn't it go the the latest tab?
Also - if all tabs are deleted it creates a strange use case:
image
maybe we need to add that if only one is left it can't be removed?

libs/components/src/lib/tab/README.md Outdated Show resolved Hide resolved
libs/components/src/lib/tab/tab.template.ts Outdated Show resolved Hide resolved
TaylorJ76 and others added 2 commits September 26, 2024 11:13
Co-authored-by: Rachel Bratt Tannenbaum <rachelbt@users.noreply.github.com>
Co-authored-by: Rachel Bratt Tannenbaum <rachelbt@users.noreply.github.com>
@TaylorJ76
Copy link
Contributor Author

didn't went over all the code yet, tested keyboad navigation and screen-reader and its not 100%. When tab is removed (also - there's no way to know it is removable), the focus disappears, shouldn't it go the the latest tab? Also - if all tabs are deleted it creates a strange use case: image maybe we need to add that if only one is left it can't be removed?

As the removal of the tab is up to the consumer, I think handling this use case is also the consumers responsibility. I have update the examples so that when the last tab is removed, the whole tab component is also removed. And I have updated the warning note on the tab page.

id="close-btn"
@click="${(x, c) => x._handleCloseClick(c.event)}"
>
<${iconTag}
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use here the affix pattern as well?

Copy link
Contributor

@rachelbt rachelbt left a comment

Choose a reason for hiding this comment

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

👍 just ine comment about the icon

Copy link
Contributor

@rachelbt rachelbt left a comment

Choose a reason for hiding this comment

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

looks great

@TaylorJ76 TaylorJ76 merged commit 1249285 into main Oct 2, 2024
15 checks passed
@TaylorJ76 TaylorJ76 deleted the VIV-2030-closable-tab branch October 2, 2024 06:39
@github-actions github-actions bot mentioned this pull request Oct 2, 2024
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.

3 participants