Navbar customization v2 (#18026)

Adds color support for navigation menu items.

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Devessier <baptiste@devessier.fr>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Abdul Rahman
2026-02-28 16:18:28 +05:30
committed by GitHub
parent 63f17eec2c
commit 9fe2a07c55
94 changed files with 1204 additions and 474 deletions
@@ -1,10 +1,10 @@
import { v4 } from 'uuid';
import { isDefined } from 'twenty-shared/utils';
import { v4 } from 'uuid';
import type { NavigationMenuItem } from '~/generated-metadata/graphql';
import { navigationMenuItemsDraftState } from '@/navigation-menu-item/states/navigationMenuItemsDraftState';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { computeInsertIndexAndPosition } from '@/navigation-menu-item/utils/computeInsertIndexAndPosition';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
export const useAddViewToNavigationMenuDraft = () => {
const setNavigationMenuItemsDraft = useSetAtomState(
@@ -16,6 +16,7 @@ export const useAddViewToNavigationMenuDraft = () => {
currentDraft: NavigationMenuItem[],
targetFolderId?: string | null,
targetIndex?: number,
color?: string | null,
): string => {
const folderId = targetFolderId ?? null;
@@ -44,6 +45,7 @@ export const useAddViewToNavigationMenuDraft = () => {
folderId: folderId ?? undefined,
name: undefined,
applicationId: undefined,
color,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
};