dxc-technology / halstack-react

Library of components for building SPAs with React and Halstack Design System
https://developer.dxc.com/halstack/
Apache License 2.0
15 stars 14 forks source link

Add Tooltip Support for Tabs Component Labels #1794

Closed diwakarang closed 7 months ago

diwakarang commented 8 months ago

Is your feature request related to a problem? Please describe. In case of lengthy text of Tabs component labels, it was suggested to keep the label short. That can be done at the user application itself, since the label is provided by user application as prop to the component. Also, it would be helpful, if tooltip is available for each tab, so user can view full text if needed, and tabs labels will still hold short text. This tooltip is not at the control of user, so this issue is raised requesting to add this feature. The below screenshot shows the text truncated by user application and expected behavior of tooltip when this feature request is implemented. image

Describe the solution you'd like Add a optional title key to tabs object in TabsComponent prop. So it would be

tabs: { label: string,
 title?: string,
 icon: string | (React.ReactNode & React.SVGProps <SVGSVGElement>), 
isDisabled: boolean, 
notificationNumber: boolean | number 
}[]

Describe alternatives you've considered Considered the possibility of showing the full value of activeTab label in the content area of that tab. However this takes up more screen space, and reduces screen real estate for other components. Hence we had to discard this option.

image

Additional context Related issues already created.

1682 , #1681

Add Labels tabs, tooltip, halstack tabs, enhancement, Tabs,

GomezIvann commented 8 months ago

Hello, @diwakarang

We are going to review this issue tomorrow. I will come up to you as soon as we reach an agreement on how to proceed with this.

Thanks for the patience!

GomezIvann commented 8 months ago

Hello again, @diwakarang

We still have some doubts about this use case. As we already answered you in other issues, we do not encourage our users to use very long labels for the tabs. So, we are going to review the design and think of an alternative to this.

Thanks for the feedback!

kukoc commented 7 months ago

Hello,

After discussion, we are not going to support the requested feature in Halstack. Thank you in any case for proposing it and helping us to improve.