Skip to content

Commit 51661f0

Browse files
authored
fix(ui5-shellbar): remove empty logo from tab chain (#11623)
Fixes: #11595 Shellbar without logo and primary title no longer renders an empty placeholder. This prevent an unnecessary tab stop while navigating.
1 parent 10dcc69 commit 51661f0

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/fiori/cypress/specs/ShellBar.cy.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ describe("Events", () => {
528528
.should("have.been.calledOnce");
529529
});
530530
});
531+
531532
describe("ButtonBadge in ShellBar", () => {
532533
it("Test if ShellBarItem count appears in ButtonBadge", () => {
533534
cy.mount(
@@ -622,3 +623,15 @@ describe("ButtonBadge in ShellBar", () => {
622623
.should("have.attr", "text", "42");
623624
});
624625
});
626+
627+
describe("Keyboard Navigation", () => {
628+
it("Test logo area elements are not rendered when no logo and primaryTitle are provided", () => {
629+
cy.mount(<ShellBar></ShellBar>);
630+
cy.wait(RESIZE_THROTTLE_RATE);
631+
632+
cy.get("[ui5-shellbar]")
633+
.shadow()
634+
.find(".ui5-shellbar-logo-area")
635+
.should("not.exist");
636+
});
637+
});

packages/fiori/src/ShellBarTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function ShellBarTemplate(this: ShellBar) {
5656
{!this.hasMenuItems && (
5757
<>
5858
{this.isSBreakPoint && this.hasLogo && singleLogo.call(this)}
59-
{!this.isSBreakPoint && (
59+
{!this.isSBreakPoint && (this.hasLogo || this.primaryTitle) && (
6060
<>
6161
{combinedLogo.call(this)}
6262
{this.secondaryTitle && this.primaryTitle && (

0 commit comments

Comments
 (0)