Skip to content

Tabs Component should show Horizontal scroller if tabs go out of view of the container #1681

@diwakarang

Description

@diwakarang

Describe the bug
Tabs Component does not show horizontal scrollers. Also, In certain cases, pdf names are hidden by misaligned text.

To Reproduce

  1. Visit Halstack component website, and add following values to list of tabs

     [
          {
            label: "Customer Journey V2 Jan 2023.pdf",
          },
          {
            label: "Market Compensation Levels Report Q1 2023.pdf",
          },
          {
            label: "Market Reform Contract",
          },
          {
            label: "Market Reform Proposal",
          }
     ] 

  1. If above values are not used, ensure, tabs contain three or more tab labels with lengthy text values.
  2. During initial load, it can be observed, horiztonal scroller buttons to scroll the tabs are not present.
  3. Resize the window(using any method, say, change window size , fullscreen and exit fullscreen, dev tools, etc)
  4. After resize the scrolls are visible.
  5. Horizontal Scrollers should be visible in first place, but visible only after a resize event is fired. This seems to a bug.

Expected behaviour

  1. User need to be aware if there are more tabs present, apart from the ones that are in view.
  2. User should be able to access horizontal scroll buttons to scroll between the tabs in all cases

Screenshots

Without Scroll
image

With Scroll after fullscreen
image

First Tab Name difficult to view
image

Additional context
Most of the time, after resize event occurs in the window, scrollers are visible.

Add labels
Tabs, DxcTabs

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjiraThis task is referenced in a story of Jira

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions