Skip to content

Commit

Permalink
Workflow dark mode improvements (#9412)
Browse files Browse the repository at this point in the history
## Dark mode

Old vs New

![CleanShot 2025-01-06 at 17 49
19@2x](https://github.com/user-attachments/assets/4fda3da0-3a84-43b5-a60b-ee2f3356e540)

![CleanShot 2025-01-06 at 17 49
32@2x](https://github.com/user-attachments/assets/e2aa498a-fa4d-41d3-af20-fa3ab605bbab)

## Light mode

Old vs New

![CleanShot 2025-01-06 at 17 49
11@2x](https://github.com/user-attachments/assets/0587d18f-4f1d-42bd-94a5-9e06be685bb3)

![CleanShot 2025-01-06 at 17 49
01@2x](https://github.com/user-attachments/assets/aacbc40c-c477-4ece-bed2-12cdf18ab705)
  • Loading branch information
Devessier authored Jan 6, 2025
1 parent a9b95bc commit c61831c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const StyledStepNodeType = styled.div`
border-radius: ${({ theme }) => theme.border.radius.sm}
${({ theme }) => theme.border.radius.sm} 0 0;
color: ${({ theme }) => theme.color.gray50};
color: ${({ theme }) => theme.font.color.light};
font-size: ${({ theme }) => theme.font.size.md};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
Expand Down Expand Up @@ -53,7 +53,7 @@ const StyledStepNodeInnerContainer = styled.div<{ variant?: Variant }>`
.selectable.selected &,
.selectable:focus &,
.selectable:focus-visible & {
background-color: ${({ theme }) => theme.color.blue10};
background-color: ${({ theme }) => theme.accent.quaternary};
border-color: ${({ theme }) => theme.color.blue};
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
WorkflowDiagramNodeType,
} from '@/workflow/workflow-diagram/types/WorkflowDiagram';
import { getOrganizedDiagram } from '@/workflow/workflow-diagram/utils/getOrganizedDiagram';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import {
applyEdgeChanges,
Expand All @@ -29,7 +30,7 @@ import {
import '@xyflow/react/dist/style.css';
import React, { useEffect, useMemo, useRef } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { GRAY_SCALE, isDefined, THEME_COMMON } from 'twenty-ui';
import { isDefined, THEME_COMMON } from 'twenty-ui';

const StyledResetReactflowStyles = styled.div`
height: 100%;
Expand Down Expand Up @@ -87,6 +88,8 @@ export const WorkflowDiagramCanvasBase = ({
>;
children?: React.ReactNode;
}) => {
const theme = useTheme();

const reactflow = useReactFlow();
const setWorkflowReactFlowRefState = useSetRecoilState(
workflowReactFlowRefState,
Expand Down Expand Up @@ -219,7 +222,7 @@ export const WorkflowDiagramCanvasBase = ({
nodesDraggable={false}
paneClickDistance={10} // Fix small unwanted user dragging does not select node
>
<Background color={GRAY_SCALE.gray25} size={2} />
<Background color={theme.border.color.medium} size={2} />

{children}
</ReactFlow>
Expand Down

0 comments on commit c61831c

Please sign in to comment.