diff --git a/packages/fiori/cypress/specs/UserMenu.cy.tsx b/packages/fiori/cypress/specs/UserMenu.cy.tsx
index a9f0ae62ea6ed..b686142bb85b3 100644
--- a/packages/fiori/cypress/specs/UserMenu.cy.tsx
+++ b/packages/fiori/cypress/specs/UserMenu.cy.tsx
@@ -877,6 +877,22 @@ describe("Events", () => {
cy.get("@opened").should("have.been.calledOnce");
});
+ it("focuses first menu item after open", () => {
+ cy.mount(
+ <>
+
+
+
+
+
+
+ >
+ );
+
+ cy.get("[ui5-user-menu-item][text='Setting']")
+ .should("be.focused");
+ });
+
it("tests close event", () => {
cy.mount(
<>
@@ -970,7 +986,27 @@ describe("Responsiveness", () => {
.scrollTo("bottom");
cy.get("[ui5-user-menu]").shadow().find("[ui5-bar]").as("headerBar");
cy.get("@headerBar").find("[ui5-title]").contains("Alain Chevalier 1");
- cy.get("@headerBar").find("[ui5-button]").should("have.length", 1);
+ cy.get("@headerBar").find("[ui5-button][slot='endContent']").should("have.length", 1);
+ });
+
+ it("popover header has no divider line (::before pseudo-element hidden)", () => {
+ cy.mount(
+ <>
+
+
+
+
+ >
+ );
+
+ cy.get("[ui5-user-menu]").shadow()
+ .find("[ui5-responsive-popover]")
+ .shadow()
+ .find(".ui5-popup-header-root")
+ .then($el => {
+ const before = window.getComputedStyle($el[0], "::before");
+ expect(before.display).to.equal("none");
+ });
});
it("Event firing - 'ui5-check' after 'click' on user menu item", () => {
@@ -1315,6 +1351,26 @@ describe("InfoArea slot", () => {
});
});
});
+
+ it("info-area has 8px padding on all sides", () => {
+ cy.mount(
+ <>
+
+
+
+
+ All actions are recorded under the proxy audit log.
+
+
+ >
+ );
+
+ cy.get("[ui5-user-menu]").shadow().find(".ui5-user-menu-info-area")
+ .should("have.css", "padding-top", "8px")
+ .and("have.css", "padding-bottom", "8px")
+ .and("have.css", "padding-left", "8px")
+ .and("have.css", "padding-right", "8px");
+ });
});
describe("UserMenuItem", () => {
@@ -1580,7 +1636,7 @@ describe("UserMenuItem", () => {
.should("not.have.attr", "show-selection");
});
- it("selection text has correct styling", () => {
+ it("selection text wraps instead of truncating", () => {
cy.mount(
<>
@@ -1598,9 +1654,8 @@ describe("UserMenuItem", () => {
.shadow()
.find(".ui5-user-menu-item-selection-text")
.should("have.css", "font-weight", "400")
- .and("have.css", "white-space", "nowrap")
- .and("have.css", "overflow", "hidden")
- .and("have.css", "text-overflow", "ellipsis");
+ .and("not.have.css", "white-space", "nowrap")
+ .and("not.have.css", "text-overflow", "ellipsis");
});
it("text wrapper has column layout with gap", () => {
diff --git a/packages/fiori/src/UserMenu.ts b/packages/fiori/src/UserMenu.ts
index e8b26d0be842a..ef89551a20364 100644
--- a/packages/fiori/src/UserMenu.ts
+++ b/packages/fiori/src/UserMenu.ts
@@ -433,6 +433,7 @@ class UserMenu extends UI5Element {
this._titleMovedToHeader = false;
this._isScrolled = false;
this._setupObserver();
+ this._menuItems[0]?.getFocusDomRef()?.focus();
this.fireDecoratorEvent("open");
}
diff --git a/packages/fiori/src/UserMenuTemplate.tsx b/packages/fiori/src/UserMenuTemplate.tsx
index 29ea8379b50ea..953eb08668dad 100644
--- a/packages/fiori/src/UserMenuTemplate.tsx
+++ b/packages/fiori/src/UserMenuTemplate.tsx
@@ -57,6 +57,13 @@ export default function UserMenuTemplate(this: UserMenu) {
onClick={this._closeUserMenu}
slot="endContent"
/>}
+
+ {this._isPhone && this._titleMovedToHeader && }
+
>
)
diff --git a/packages/main/src/themes/Menu.css b/packages/main/src/themes/Menu.css
index c3dd4c1596a14..9488fe0a09262 100644
--- a/packages/main/src/themes/Menu.css
+++ b/packages/main/src/themes/Menu.css
@@ -59,7 +59,10 @@
}
.ui5-menu-back-button {
- margin-right: 1rem;
+}
+
+.ui5-menu-close-button {
+ margin-left: auto;
}
.ui5-menu-dialog-footer {
diff --git a/packages/website/docs/_samples/fiori/UserMenu/Advanced/main.js b/packages/website/docs/_samples/fiori/UserMenu/Advanced/main.js
index 53da0eb45df3f..b430284532032 100644
--- a/packages/website/docs/_samples/fiori/UserMenu/Advanced/main.js
+++ b/packages/website/docs/_samples/fiori/UserMenu/Advanced/main.js
@@ -14,6 +14,7 @@ import "@ui5/webcomponents-icons/dist/official-service.js";
import "@ui5/webcomponents-icons/dist/private.js";
import "@ui5/webcomponents-icons/dist/accelerated.js";
import "@ui5/webcomponents-icons/dist/message-information.js";
+import "@ui5/webcomponents-icons/dist/home.js";
const shellbar = document.getElementById("shellbar");
const menu = document.getElementById("userMenu");
diff --git a/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.html b/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.html
index be3af70dfc0c4..eada630c0cd08 100644
--- a/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.html
+++ b/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.html
@@ -55,19 +55,20 @@
subtitle-text="davud,wilson@sap.com"
description="Project Manager">
-
+
-
-
-
+
-
-
+
+
+
+
+
diff --git a/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.tsx b/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.tsx
index 1d736c4a16536..87db04082695b 100644
--- a/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.tsx
+++ b/packages/website/docs/_samples/fiori/UserMenu/Advanced/sample.tsx
@@ -15,6 +15,7 @@ import "@ui5/webcomponents-icons/dist/collaborate.js";
import "@ui5/webcomponents-icons/dist/official-service.js";
import "@ui5/webcomponents-icons/dist/private.js";
import "@ui5/webcomponents-icons/dist/accelerated.js";
+import "@ui5/webcomponents-icons/dist/home.js";
const ShellBar = createReactComponent(ShellBarClass);
const ShellBarBranding = createReactComponent(ShellBarBrandingClass);
@@ -149,7 +150,7 @@ function App() {
subtitleText="davud,wilson@sap.com"
description="Project Manager"
/>
-
+
-
-
-
+
-
-
+
+
+
+
+
>
);
diff --git a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html
index 19990da21f7ce..416fd2ea92a2b 100644
--- a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html
+++ b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html
@@ -39,7 +39,7 @@
description="Delivery Manager"
selected>
-
+
diff --git a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.tsx b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.tsx
index bc89116b4e8aa..15193d00261d0 100644
--- a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.tsx
+++ b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.tsx
@@ -102,7 +102,7 @@ function App() {
description="Delivery Manager"
selected={true}
/>
-
+
-
+
+
+
+
+
+
+
+
diff --git a/packages/website/docs/_samples/fiori/UserSettingsDialog/Basic/sample.tsx b/packages/website/docs/_samples/fiori/UserSettingsDialog/Basic/sample.tsx
index 6aa4908a07e84..86da48102f6c6 100644
--- a/packages/website/docs/_samples/fiori/UserSettingsDialog/Basic/sample.tsx
+++ b/packages/website/docs/_samples/fiori/UserSettingsDialog/Basic/sample.tsx
@@ -8,6 +8,7 @@ import ShellBarBrandingClass from "@ui5/webcomponents-fiori/dist/ShellBarBrandin
import UserMenuClass from "@ui5/webcomponents-fiori/dist/UserMenu.js";
import UserMenuAccountClass from "@ui5/webcomponents-fiori/dist/UserMenuAccount.js";
import UserMenuItemClass from "@ui5/webcomponents-fiori/dist/UserMenuItem.js";
+import UserMenuItemGroupClass from "@ui5/webcomponents-fiori/dist/UserMenuItemGroup.js";
import UserSettingsAccountViewClass from "@ui5/webcomponents-fiori/dist/UserSettingsAccountView.js";
import UserSettingsAppearanceViewClass from "@ui5/webcomponents-fiori/dist/UserSettingsAppearanceView.js";
import UserSettingsAppearanceViewGroupClass from "@ui5/webcomponents-fiori/dist/UserSettingsAppearanceViewGroup.js";
@@ -35,12 +36,14 @@ import "@ui5/webcomponents-icons/dist/iphone.js";
import "@ui5/webcomponents-icons/dist/qr-code.js";
import "@ui5/webcomponents-icons/dist/bell.js";
import "@ui5/webcomponents-icons/dist/reset.js";
+import "@ui5/webcomponents-icons/dist/home.js";
const ShellBar = createReactComponent(ShellBarClass);
const ShellBarBranding = createReactComponent(ShellBarBrandingClass);
const UserMenu = createReactComponent(UserMenuClass);
const UserMenuAccount = createReactComponent(UserMenuAccountClass);
const UserMenuItem = createReactComponent(UserMenuItemClass);
+const UserMenuItemGroup = createReactComponent(UserMenuItemGroupClass);
const UserSettingsAccountView = createReactComponent(UserSettingsAccountViewClass);
const UserSettingsAppearanceView = createReactComponent(
UserSettingsAppearanceViewClass,
@@ -272,7 +275,14 @@ function App() {
description="Delivery Manager, SAP SE"
selected={true}
/>
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
diff --git a/packages/website/docs/_samples/fiori/UserSettingsDialog/SaveMode/sample.tsx b/packages/website/docs/_samples/fiori/UserSettingsDialog/SaveMode/sample.tsx
index 72d39a00d5281..bf31a776e4b3f 100644
--- a/packages/website/docs/_samples/fiori/UserSettingsDialog/SaveMode/sample.tsx
+++ b/packages/website/docs/_samples/fiori/UserSettingsDialog/SaveMode/sample.tsx
@@ -8,6 +8,7 @@ import ShellBarBrandingClass from "@ui5/webcomponents-fiori/dist/ShellBarBrandin
import UserMenuClass from "@ui5/webcomponents-fiori/dist/UserMenu.js";
import UserMenuAccountClass from "@ui5/webcomponents-fiori/dist/UserMenuAccount.js";
import UserMenuItemClass from "@ui5/webcomponents-fiori/dist/UserMenuItem.js";
+import UserMenuItemGroupClass from "@ui5/webcomponents-fiori/dist/UserMenuItemGroup.js";
import UserSettingsAccountViewClass from "@ui5/webcomponents-fiori/dist/UserSettingsAccountView.js";
import UserSettingsAppearanceViewClass from "@ui5/webcomponents-fiori/dist/UserSettingsAppearanceView.js";
import UserSettingsAppearanceViewGroupClass from "@ui5/webcomponents-fiori/dist/UserSettingsAppearanceViewGroup.js";
@@ -32,12 +33,14 @@ import "@ui5/webcomponents-icons/dist/user-settings.js";
import "@ui5/webcomponents-icons/dist/person-placeholder.js";
import "@ui5/webcomponents-icons/dist/palette.js";
import "@ui5/webcomponents-icons/dist/reset.js";
+import "@ui5/webcomponents-icons/dist/home.js";
const ShellBar = createReactComponent(ShellBarClass);
const ShellBarBranding = createReactComponent(ShellBarBrandingClass);
const UserMenu = createReactComponent(UserMenuClass);
const UserMenuAccount = createReactComponent(UserMenuAccountClass);
const UserMenuItem = createReactComponent(UserMenuItemClass);
+const UserMenuItemGroup = createReactComponent(UserMenuItemGroupClass);
const UserSettingsAccountView = createReactComponent(UserSettingsAccountViewClass);
const UserSettingsAppearanceView = createReactComponent(
UserSettingsAppearanceViewClass,
@@ -236,7 +239,14 @@ function App() {
description="Delivery Manager, SAP SE"
selected={true}
/>
-
+
+
+
+
+
+
+
+