Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Feat]: Add navigation UI enhancements#2078

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
raheeliftikhar5 merged 22 commits intolowcoder-org:devfromiamfaran:feat/nav-features
Nov 17, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
22 commits
Select commitHold shift + click to select a range
f4109c6
[Fix]: #2076 mobile nav app not passing params
iamfaranNov 4, 2025
16e9d0a
[Feat]: Add hamburger menu mode for Mobile Nav App + refactor
iamfaranNov 4, 2025
9408350
add customizeable icon burger icon
iamfaranNov 4, 2025
b15b10a
add close icon in the drawer
iamfaranNov 5, 2025
a73890c
add style customization for hamburger menu mode
iamfaranNov 5, 2025
b2254a0
fix scroll issue for the nav apps propertyview
iamfaranNov 5, 2025
a7a9a1b
[Fix]: navigation apps render inside the preview
iamfaranNov 6, 2025
2a82955
[Fix]: render the drawer inside the preivew/app canvas
iamfaranNov 6, 2025
1ceefdb
add navigation component burger mode
iamfaranNov 7, 2025
795c181
refactor navigation component
iamfaranNov 10, 2025
0d2d8e4
make drawer placement control consistent
iamfaranNov 10, 2025
5addc32
fix hamburger menu options
iamfaranNov 10, 2025
d47b2fb
add conditional UI on basis of mode
iamfaranNov 10, 2025
5c5d19b
add segmented control for both modes in the navComp
iamfaranNov 10, 2025
2eb4675
add ability to add icon on nav items / sub menu
iamfaranNov 11, 2025
7c1837a
fix drawer styles customization
iamfaranNov 11, 2025
978c641
add styles for the submenu
iamfaranNov 11, 2025
228bd0c
fix submenu style issues
iamfaranNov 12, 2025
409ea51
remove trigger
iamfaranNov 12, 2025
571122d
add desktop nav positions
iamfaranNov 13, 2025
288fe92
refactor navlayout
iamfaranNov 14, 2025
0c1c690
fix center icons on collapse + mount issue
iamfaranNov 14, 2025
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
PrevPrevious commit
NextNext commit
add style customization for hamburger menu mode
  • Loading branch information
@iamfaran
iamfaran committedNov 5, 2025
commita73890cffa83945f8617717f051a558a67b0a45a
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ import { hiddenPropertyView } from "comps/utils/propertyUtils";
import { dropdownControl } from "@lowcoder-ee/comps/controls/dropdownControl";
import { DataOption, DataOptionType, menuItemStyleOptions, mobileNavJsonMenuItems, MobileModeOptions, MobileMode, HamburgerPositionOptions, DrawerPlacementOptions } from "./navLayoutConstants";
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
import { NavLayoutItemActiveStyle, NavLayoutItemActiveStyleType, NavLayoutItemHoverStyle, NavLayoutItemHoverStyleType, NavLayoutItemStyle, NavLayoutItemStyleType, NavLayoutStyle, NavLayoutStyleType } from "@lowcoder-ee/comps/controls/styleControlConstants";
import {HamburgerButtonStyle, DrawerContainerStyle,NavLayoutItemActiveStyle, NavLayoutItemActiveStyleType, NavLayoutItemHoverStyle, NavLayoutItemHoverStyleType, NavLayoutItemStyle, NavLayoutItemStyleType, NavLayoutStyle, NavLayoutStyleType } from "@lowcoder-ee/comps/controls/styleControlConstants";
import Segmented from "antd/es/segmented";
import { controlItem } from "components/control";
import { check } from "@lowcoder-ee/util/convertUtils";
Expand DownExpand Up@@ -72,15 +72,23 @@ const HamburgerButton = styled.button<{
$size: string;
$position: string; // bottom-right | bottom-left | top-right | top-left
$zIndex: number;
$background?: string;
$borderColor?: string;
$radius?: string;
$margin?: string;
$padding?: string;
$borderWidth?: string;
}>`
position: fixed;
${(props) => (props.$position.includes('bottom') ? 'bottom: 16px;' : 'top: 16px;')}
${(props) => (props.$position.includes('right') ? 'right: 16px;' : 'left: 16px;')}
width: ${(props) => props.$size};
height: ${(props) => props.$size};
border-radius: 50%;
border: 1px solid rgba(0,0,0,0.1);
background: white;
border-radius: ${(props) => props.$radius || '50%'};
border: ${(props) => props.$borderWidth || '1px'} solid ${(props) => props.$borderColor || 'rgba(0,0,0,0.1)'};
background: ${(props) => props.$background || 'white'};
margin: ${(props) => props.$margin || '0px'};
padding: ${(props) => props.$padding || '0px'};
display: flex;
align-items: center;
justify-content: center;
Expand DownExpand Up@@ -108,16 +116,34 @@ const BurgerIcon = styled.div<{
&::after { top: 6px; }
`;

const IconWrapper = styled.div<{
$iconColor?: string;
}>`
display: inline-flex;
align-items: center;
justify-content: center;
svg {
color: ${(p) => p.$iconColor || 'inherit'};
fill: ${(p) => p.$iconColor || 'currentColor'};
}
`;

const DrawerContent = styled.div<{
$background: string;
$padding?: string;
$borderColor?: string;
$borderWidth?: string;
$margin?: string;
}>`
background: ${(p) => p.$background};
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
padding: 12px;
padding: ${(p) => p.$padding || '12px'};
margin: ${(p) => p.$margin || '0px'};
box-sizing: border-box;
border: ${(p) => p.$borderWidth || '1px'} solid ${(p) => p.$borderColor || 'transparent'};
`;

const DrawerHeader = styled.div`
Expand DownExpand Up@@ -425,7 +451,7 @@ function renderHamburgerLayoutSection(children: any): any {
const drawerPlacement = children.drawerPlacement.getView();
return (
<>
{children.hamburgerIcon.propertyView({ label: "MenuIcon" })}
{children.hamburgerIcon.propertyView({ label: "Menu Icon" })}
{children.drawerCloseIcon.propertyView({ label: "Close Icon" })}
{children.hamburgerPosition.propertyView({ label: "Hamburger Position" })}
{children.hamburgerSize.propertyView({ label: "Hamburger Size" })}
Expand DownExpand Up@@ -462,6 +488,8 @@ function renderVerticalLayoutSection(children: any): any {
);
}



let MobileTabLayoutTmp = (function () {
const childrenMap = {
onEvent: eventHandlerControl(EventOptions),
Expand DownExpand Up@@ -492,7 +520,7 @@ let MobileTabLayoutTmp = (function () {
drawerCloseIcon: IconControl,
hamburgerPosition: dropdownControl(HamburgerPositionOptions, "bottom-right"),
hamburgerSize: withDefault(StringControl, "56px"),
drawerPlacement: dropdownControl(DrawerPlacementOptions, "bottom"),
drawerPlacement: dropdownControl(DrawerPlacementOptions, "right"),
drawerHeight: withDefault(StringControl, "60%"),
drawerWidth: withDefault(StringControl, "250px"),
shadowOverlay: withDefault(BoolCodeControl, true),
Expand All@@ -506,6 +534,8 @@ let MobileTabLayoutTmp = (function () {
navItemStyle: styleControl(NavLayoutItemStyle, 'navItemStyle'),
navItemHoverStyle: styleControl(NavLayoutItemHoverStyle, 'navItemHoverStyle'),
navItemActiveStyle: styleControl(NavLayoutItemActiveStyle, 'navItemActiveStyle'),
hamburgerButtonStyle: styleControl(HamburgerButtonStyle, 'hamburgerButtonStyle'),
drawerContainerStyle: styleControl(DrawerContainerStyle, 'drawerContainerStyle'),
};
return new MultiCompBuilder(childrenMap, (props, dispatch) => {
return null;
Expand All@@ -524,10 +554,18 @@ let MobileTabLayoutTmp = (function () {
? renderHamburgerLayoutSection(children)
: renderVerticalLayoutSection(children)}
</Section>
<Section name={trans("navLayout.navStyle")}>
{children.navStyle.getPropertyView()}
</Section>
<Section name={trans("navLayout.navItemStyle")}>
{!isHamburgerMode && (
<Section name={trans("navLayout.navStyle")}>
{children.navStyle.getPropertyView()}
</Section>
)}

{isHamburgerMode && (
<Section name={"Hamburger Button Style"}>
{children.hamburgerButtonStyle.getPropertyView()}
</Section>
)}
<Section name={isHamburgerMode ? "Drawer Item Style" : trans("navLayout.navItemStyle")}>
{controlItem({}, (
<Segmented
block
Expand All@@ -540,6 +578,11 @@ let MobileTabLayoutTmp = (function () {
{styleSegment === 'hover' && children.navItemHoverStyle.getPropertyView()}
{styleSegment === 'active' && children.navItemActiveStyle.getPropertyView()}
</Section>
{isHamburgerMode && (
<Section name={"Drawer Container Style"}>
{children.drawerContainerStyle.getPropertyView()}
</Section>
)}
</>
);
})
Expand All@@ -563,6 +606,7 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
const hamburgerSize = comp.children.hamburgerSize.getView();
const hamburgerIconComp = comp.children.hamburgerIcon;
const drawerCloseIconComp = comp.children.drawerCloseIcon;
const hamburgerButtonStyle = comp.children.hamburgerButtonStyle.getView();
const drawerPlacement = comp.children.drawerPlacement.getView();
const drawerHeight = comp.children.drawerHeight.getView();
const drawerWidth = comp.children.drawerWidth.getView();
Expand All@@ -572,6 +616,7 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
const maxWidth = comp.children.maxWidth.getView();
const verticalAlignment = comp.children.verticalAlignment.getView();
const showSeparator = comp.children.showSeparator.getView();
const drawerContainerStyle = comp.children.drawerContainerStyle.getView();
const bgColor = (useContext(ThemeContext)?.theme || defaultTheme).canvas;
const onEvent = comp.children.onEvent.getView();

Expand DownExpand Up@@ -626,6 +671,21 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
backgroundStyle = `center / cover url('${backgroundImage}') no-repeat, ${backgroundStyle}`;
}

const navigateToApp = (nextIndex: number) => {
if (dataOptionType === DataOption.Manual) {
const selectedTab = tabViews[nextIndex];
if (selectedTab) {
const url = [
ALL_APPLICATIONS_URL,
pathParam.applicationId,
pathParam.viewMode,
nextIndex,
].join("/");
selectedTab.children.action.act(url);
}
}
};

const tabBarView = (
<TabBarView
onEvent={onEvent}
Expand All@@ -641,18 +701,7 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
const nextIndex = Number(key);
setTabIndex(nextIndex);
// push URL with query/hash params
if (dataOptionType === DataOption.Manual) {
const selectedTab = tabViews[nextIndex];
if (selectedTab) {
const url = [
ALL_APPLICATIONS_URL,
pathParam.applicationId,
pathParam.viewMode,
nextIndex,
].join("/");
selectedTab.children.action.act(url);
}
}
navigateToApp(nextIndex);
}}
readOnly={!!readOnly}
canvasBg={bgColor}
Expand DownExpand Up@@ -682,11 +731,21 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
$size={hamburgerSize}
$position={hamburgerPosition}
$zIndex={Layers.tabBar + 1}
$background={hamburgerButtonStyle?.background}
$borderColor={hamburgerButtonStyle?.border}
$radius={hamburgerButtonStyle?.radius}
$margin={hamburgerButtonStyle?.margin}
$padding={hamburgerButtonStyle?.padding}
$borderWidth={hamburgerButtonStyle?.borderWidth}
onClick={() => setDrawerVisible(true)}
>
{hamburgerIconComp.toJsonValue()
? hamburgerIconComp.getView()
: <BurgerIcon $lineColor={navStyle.text} />}
{hamburgerIconComp.toJsonValue() ? (
<IconWrapper $iconColor={hamburgerButtonStyle?.iconFill}>
{hamburgerIconComp.getView()}
</IconWrapper>
) : (
<BurgerIcon $lineColor={hamburgerButtonStyle?.iconFill || navStyle.text} />
)}
</HamburgerButton>
);

Expand All@@ -707,7 +766,13 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
mask={shadowOverlay}
bodyStyle={drawerBodyStyle}
>
<DrawerContent $background={backgroundStyle}>
<DrawerContent
$background={drawerContainerStyle?.background || '#FFFFFF'}
$padding={drawerContainerStyle?.padding}
$borderColor={drawerContainerStyle?.border}
$borderWidth={drawerContainerStyle?.borderWidth}
$margin={drawerContainerStyle?.margin}
>
<DrawerHeader>
<DrawerCloseButton
aria-label="Close"
Expand All@@ -732,6 +797,7 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
setTabIndex(index);
setDrawerVisible(false);
onEvent('click');
navigateToApp(index);
}}
>
{tab.children.icon.toJsonValue() ? (
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1382,6 +1382,30 @@ export const FloatButtonStyle = [
BORDER_WIDTH,
] as const;

export const HamburgerButtonStyle = [
getBackground(),
{
name: "iconFill",
label: trans("style.fill"),
depTheme: "primary",
depType: DEP_TYPE.SELF,
transformer: toSelf,
},
MARGIN,
PADDING,
BORDER,
RADIUS,
BORDER_WIDTH,
] as const;

export const DrawerContainerStyle = [
getBackground(),
MARGIN,
PADDING,
BORDER,
BORDER_WIDTH,
] as const;

export const TransferStyle = [
getStaticBackground(SURFACE_COLOR),
...STYLING_FIELDS_CONTAINER_SEQUENCE.filter(style=>style.name!=='rotation'),
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp