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

refactor(ui5-tabcontainer): tabs can be modified completely #1507

Merged
merged 9 commits into from
Apr 29, 2020

Conversation

vladitasev
Copy link
Contributor

@vladitasev vladitasev commented Apr 21, 2020

Before this change, extending the ui5-tab component didn't allow to modify anything but its presentation in the content area of the ui5-tabcontainer. The whole rendering of tabs was in practice done inside the Tab Container.

ui5-tab now has 3 templates

  • Regular template (Tab.hbs)
  • Template in tab strip (TabInStrip.hbs) - used in the TabContainer template
  • Template in overflow menu (TabInOverflow.hbs) - used in the TabContainerPopover template

ui5-tab now has 3 CSS files

  • Regular CSS (Tab.css)
  • CSS in tab strip (TabInStrip.css) - treated as part of the TabContainer CSS
  • CSS in overflow menu (TabInOverflow.css) - treated as part of the TabContainer StaticArea CSS

ui5-tabcontainer is not responsible for rendering the tabs any more, tabs render themselves.

It is now possible to extend ui5-tab and provide your own templates/styles for the tab in the:

  • content area
  • strip
  • overflow menu

Note:

  • styles for tabs are registered with the TabContainer
  • tab templates are for visualization only, event handlers need to still be in the TabContainer (now moved to the ul rather than li-s)

@vladitasev vladitasev changed the title poc: custom tab class refactor(ui5-tabcontainer): tabs can be modified completely Apr 22, 2020
@Hubery-Shen
Copy link

Hi, UI5 WebComponent Teams & @vladitasev

I am from Web Experience Team in SAP SuccessFactors.
Thank you for your strong support, this feature ( tabs can be modified completely ) is exactly what we want.

@vladitasev vladitasev merged commit 39bd306 into master Apr 29, 2020
@vladitasev vladitasev deleted the custom-tab-poc branch April 29, 2020 08:33
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