From 70dde21e98e5be6d88e3a133fbb85a87f6566fdf Mon Sep 17 00:00:00 2001 From: Teodor Taushanov Date: Mon, 6 Jan 2025 13:07:26 +0200 Subject: [PATCH] chore: address code comments --- packages/fiori/src/NavigationLayout.ts | 2 +- packages/fiori/src/types/NavigationLayoutMode.ts | 6 +++--- .../docs/_samples/fiori/NavigationLayout/Basic/main.js | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/fiori/src/NavigationLayout.ts b/packages/fiori/src/NavigationLayout.ts index f92b9b0fcd6b..7dbbc93e0274 100644 --- a/packages/fiori/src/NavigationLayout.ts +++ b/packages/fiori/src/NavigationLayout.ts @@ -59,7 +59,7 @@ class NavigationLayout extends UI5Element { _defaultSideCollapsed = isPhone() || (isTablet() && !isCombi()); /** - * Specifies the navigation mode. + * Specifies the navigation layout mode. * @default "Auto" * @public */ diff --git a/packages/fiori/src/types/NavigationLayoutMode.ts b/packages/fiori/src/types/NavigationLayoutMode.ts index 1f5c8cb6e3c0..6509326b25de 100644 --- a/packages/fiori/src/types/NavigationLayoutMode.ts +++ b/packages/fiori/src/types/NavigationLayoutMode.ts @@ -4,18 +4,18 @@ */ enum NavigationLayoutMode { /** - * Automatically calculates the collapsed mode based on the screen device type. + * Automatically calculates the navigation layout mode based on the screen device type. * `Expanded` on desktop and `Collapsed` on tablet and phone. * @public */ Auto = "Auto", /** - * Collapsed + * Collapsed side navigation. * @public */ Collapsed = "Collapsed", /** - * Expanded + * Expanded side navigation. * @public */ Expanded = "Expanded", diff --git a/packages/website/docs/_samples/fiori/NavigationLayout/Basic/main.js b/packages/website/docs/_samples/fiori/NavigationLayout/Basic/main.js index bba0391a5044..06d3c9a2f998 100644 --- a/packages/website/docs/_samples/fiori/NavigationLayout/Basic/main.js +++ b/packages/website/docs/_samples/fiori/NavigationLayout/Basic/main.js @@ -25,8 +25,10 @@ import "@ui5/webcomponents-icons/dist/document-text.js"; import "@ui5/webcomponents-icons/dist/compare.js"; import "@ui5/webcomponents-icons/dist/locked.js"; +import NavigationLayoutMode from "@ui5/webcomponents-fiori/dist/types/NavigationLayoutMode.js"; + document.querySelector("#startButton").addEventListener("click", function (event) { - nl1.mode = nl1.isSideCollapsed() ? "Expanded" : "Collapsed"; + nl1.mode = nl1.isSideCollapsed() ? NavigationLayoutMode.Expanded : NavigationLayoutMode.Collapsed; }); document.querySelector("#sn1").addEventListener("selection-change", function (event) {