momentum-design / momentum-ui

Momentum UI is a collection of UI libraries for implementing Momentum Design into web applications and websites.
https://momentum.design
MIT License
199 stars 204 forks source link

fix: cx-15262: follow-on issues with Momentum Tab Component #1676

Closed DeboTest closed 3 months ago

DeboTest commented 3 months ago

Description

CX-15262

Related Issue

Motivation and Context

Issues: 1) If the Tabs are closable, the Tabs are not getting closed - Only last Tab is getting closed. Also, after closing the tab, the focus is lost, hence focus should move to next focusable element.

2) If the Tab is vertical, The arrow keys are not working.

3) Also, If the Tab is draggable, The drag of tab is not working.

FIx: 1) Handle custom close event

2) When tabs are vertical, ensure when keydown event is fired that we can find the current tab. Also ensure current tabs config is equal to current tab set as there no "More Tabs" view for vertical tabs (i.e we don’t filter visible and hidden)

3) Update HTML element for tabs when visible tabs are swapped

How Has This Been Tested?

Screenshots:

Before (If applicable):

After: Screen Recording 2024-07-01 at 10 49 39

Screen Recording 2024-07-01 at 10 50 39

Screen Recording 2024-07-01 at 10 51 28

Types of changes

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.62%. Comparing base (d1784c5) to head (1e078bc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1676 +/- ## ========================================== - Coverage 94.65% 94.62% -0.04% ========================================== Files 134 134 Lines 19454 19458 +4 Branches 3038 3047 +9 ========================================== - Hits 18415 18412 -3 - Misses 1039 1046 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.