## What’s done - Clicking a favorite folder on mobile now opens a clean drill-down layer with only its contents - Added a back button (icon + folder name) — visually 100% identical to `NavigationDrawerBackButton` - Sidebar no longer collapses when opening a folder - Tree line is removed on mobile (consistent with current Twenty design) ## Intentional deviations from the mockup 1. **Back button does not replace `MultiWorkspaceDropdownButton`** Kept `NavigationDrawerHeader` untouched — it’s responsible for the hamburger menu and workspace name. Added the back button as a separate block below. → This feels cleaner architecturally and avoids breaking other places that use `NavigationDrawerHeader`. 2. **Vertical spacing between items is slightly tighter than in the mockup** Used `NavigationDrawerSubItem` — the standard component for nested items in Twenty. Current production spacing matches this exactly, so I preferred consistency over pixel-perfect mockup matching. Happy to adjust either point if the team prefers to follow the mockup 1:1. Closes #15950 --------- Co-authored-by: Baptiste Devessier <baptiste@devessier.fr>
This commit is contained in:
+3
-1
@@ -51,6 +51,7 @@ export type NavigationDrawerItemProps = {
|
||||
isRightOptionsDropdownOpen?: boolean;
|
||||
triggerEvent?: TriggerEventType;
|
||||
mouseUpNavigation?: boolean;
|
||||
preventCollapseOnMobile?: boolean;
|
||||
};
|
||||
|
||||
type StyledItemProps = Pick<
|
||||
@@ -267,6 +268,7 @@ export const NavigationDrawerItem = ({
|
||||
isRightOptionsDropdownOpen,
|
||||
triggerEvent,
|
||||
mouseUpNavigation = false,
|
||||
preventCollapseOnMobile = false,
|
||||
}: NavigationDrawerItemProps) => {
|
||||
const theme = useTheme();
|
||||
const isMobile = useIsMobile();
|
||||
@@ -282,7 +284,7 @@ export const NavigationDrawerItem = ({
|
||||
);
|
||||
|
||||
const handleMobileNavigation = () => {
|
||||
if (isMobile) {
|
||||
if (isMobile && !preventCollapseOnMobile) {
|
||||
setIsNavigationDrawerExpanded(false);
|
||||
}
|
||||
};
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const currentFavoriteFolderIdState = atom<string | null>({
|
||||
key: 'currentFavoriteFolderIdState',
|
||||
default: null,
|
||||
});
|
||||
Reference in New Issue
Block a user