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

🐛 fix(navigation): hide arrow if no overviewLink is set #1275

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fast-planets-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/design-system-components': patch
---

In the navigation component the arrow symbol for overview links will only be rendered if the link is valid
1 change: 0 additions & 1 deletion CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

* add animated logo, [#359](/~https://github.com/baloise/design-system/issues/359) ([a5af419](/~https://github.com/baloise/design-system/commit/a5af41968659c23c623d9cc5876ef7bbafe8a130))


### Bug Fixes

* **bal-navbar-logo:** fixed custom logo overflowing header ([#445](/~https://github.com/baloise/design-system/issues/445)) ([2e650e7](/~https://github.com/baloise/design-system/commit/2e650e78cc79d2095f079c58b7710d71b951c30e))
Expand Down
8 changes: 4 additions & 4 deletions docs/stories/components/bal-nav/bal-nav.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ export const optionLinkItems = [
},
],
overviewLink: {
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
href: 'http://localhost:3334/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down Expand Up @@ -493,8 +493,8 @@ export const optionLinkItems = [
},
],
overviewLink: {
value: 'Privatkunden',
label: 'Privatkunden',
value: 'Privatkunden',
label: 'Privatkunden',
href: 'http://localhost:3334/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/stories/components/bal-nav/bal-nav.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ export const optionLinkItems = [
},
],
overviewLink: {
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
href: 'http://localhost:3334/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/components/bal-nav/bal-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ export class NavMetaBar
target={this.activeMenuLinkItem?.overviewLink?.target}
onClick={() => this.linkItemClickListener(this.activeMenuLinkItem?.overviewLink)}
>
{this.activeMenuLinkItem?.overviewLink?.label} ➞
{this.activeMenuLinkItem?.overviewLink?.label}{' '}
{this.activeMenuLinkItem?.overviewLink?.label ? '➞' : ''}
</bal-nav-link>
{this.renderGridLinks(this.activeMenuLinkItem)}
</bal-nav-menu-flyout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const OverviewLink: FunctionalComponent<OverviewLinkProps> = ({ item, isM
target={item.target}
onClick={ev => onClick(ev)}
>
{item.label}
{item.label} {item.label ? '➞' : ''}
</a>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
label: 'Privatkunden',
active: true,
overviewLink: {
value: 'Privatkunden',
label: 'Privatkunden',
value: 'Privatkunden',
label: 'Privatkunden',
href: 'http://localhost:3334/components/bal-nav/test/bal-nav.visual.html',
},
mainLinkItems: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ <h2 class="title is-size-xx-large mb-normal">Heading</h2>
'Privatkunden with a very long additional text content to see if it text breaks nicely or just goes into the nowhere.',
active: true,
overviewLink: {
value: 'Privatkunden',
value: 'Privatkunden',
label:
'Privatkunden with a very long additional text content to see if it text breaks nicely or just goes into the nowhere. It even needs more text content so it is able to break.',
'Privatkunden with a very long additional text content to see if it text breaks nicely or just goes into the nowhere. It even needs more text content so it is able to break.',
href: 'http://localhost:3333/components/bal-nav/test/bal-nav.visual.html',
},
mainLinkItems: [
Expand Down Expand Up @@ -441,8 +441,8 @@ <h2 class="title is-size-xx-large mb-normal">Heading</h2>
},
],
overviewLink: {
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
value: 'Alle Versicherungslösungen',
label: 'Alle Versicherungslösungen',
href: 'http://localhost:3333/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down Expand Up @@ -645,8 +645,8 @@ <h2 class="title is-size-xx-large mb-normal">Heading</h2>
},
],
overviewLink: {
value: 'Alle Anlage- und Vorsorgelösungen',
label: 'Alle Anlage- und Vorsorgelösungen',
value: 'Alle Anlage- und Vorsorgelösungen',
label: 'Alle Anlage- und Vorsorgelösungen',
href: 'http://localhost:3333/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down Expand Up @@ -736,8 +736,8 @@ <h2 class="title is-size-xx-large mb-normal">Heading</h2>
},
],
overviewLink: {
value: 'Alle Bankprodukte',
label: 'Alle Bankprodukte',
value: 'Alle Bankprodukte',
label: 'Alle Bankprodukte',
href: 'http://localhost:3333/components/bal-nav/test/bal-nav.visual.html',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class NavigationMenu {
}}
>
<a href={this.linkHref} target={this.target} {...this.tracking}>
{this.linkName}
{this.linkName} {this.linkName ? '➞' : ''}
</a>
</div>
)}
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.