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

tabs: Improved API by making brn an hostdirective of hlm #77

Merged
merged 10 commits into from
Dec 18, 2023

Conversation

elite-benni
Copy link
Collaborator

@elite-benni elite-benni commented Dec 15, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Improved API

Which package are you modifying?

  • tabs

What is the current behavior?

You have to add brn and hlm directives to all the tabs components.

Closes #

What is the new behavior?

As we decided to make the hlm dependand on brn, we can simplify the api.

tabs

old:
<brn-tabs value="account">
new:
<div brnTabs="account">

tabs-list

old:
<brn-tabs-list hlm>
new:
<hlm-tabs-list>

tabs-trigger

The brn is a hostdirective of the hlm and does not need to be provided.
old:
<button hlmTabsTrigger brnTabsTrigger="account">
new:
<button hlmTabsTrigger="account">

tabs-content

Same as trigger.
old:
<div hlmTabsContent brnTabsContent="password">
new:
<div hlmTabsContent="password">

Does this PR introduce a breaking change?

  • Yes
  • No

You will get the following error for tabs-list, trigger and content:
Directive BrnTabsTriggerDirective matches multiple times on the same element. Directives can only match an element once.

In this case, brnTabsTrigger should be removed. See "new behavior part" of this PR.

Other information

We also added tests for brn-only to make sure @input of brn also still works correctly.

@goetzrobin goetzrobin merged commit cb465a5 into spartan-ng:main Dec 18, 2023
7 of 9 checks passed
@goetzrobin
Copy link
Collaborator

Awesome! 😎🚀🚀 Thank you for adding this!

@elite-benni elite-benni deleted the tabs branch January 24, 2024 05:18
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.

2 participants