Add counter to filter (#14108)

See figma
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=70822-35001&m=dev

<img width="75" height="61" alt="Capture d’écran 2025-08-27 à 16 57
46"
src="https://github.com/user-attachments/assets/e41290c8-3ec5-4d64-a5d2-d52bd14ccd57"
/>
<img width="75" height="61" alt="Capture d’écran 2025-08-27 à 16 57
58"
src="https://github.com/user-attachments/assets/710d5735-c256-47fc-ad2f-93e4f72b8002"
/>
<img width="121" height="89" alt="Capture d’écran 2025-08-27 à 16 16
33"
src="https://github.com/user-attachments/assets/0c8216b2-f251-4f0e-ad9f-f3a25229df40"
/>



https://github.com/user-attachments/assets/43156c0c-91b8-4386-a971-e37577e3c199
This commit is contained in:
Thomas Trompette
2025-08-27 17:25:18 +02:00
committed by GitHub
parent 58db0c9b0a
commit e449e69f4c
10 changed files with 198 additions and 24 deletions
@@ -0,0 +1,26 @@
import { createComponentSelector } from '@/ui/utilities/state/component-state/utils/createComponentSelector';
import { flowComponentState } from '@/workflow/states/flowComponentState';
import type { WorkflowAction } from '@/workflow/types/Workflow';
import { WorkflowVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowVisualizerComponentInstanceContext';
import { isDefined } from 'twenty-shared/utils';
export const createStepSelector = (stepId: string) =>
createComponentSelector<WorkflowAction | null>({
key: `stepSelector-${stepId}`,
get:
({ instanceId }) =>
({ get }) => {
const flowState = get(flowComponentState.atomFamily({ instanceId }));
if (!isDefined(flowState) || !isDefined(flowState.steps)) {
return null;
}
const step = flowState.steps.find(
(step: WorkflowAction) => step.id === stepId,
);
return step ?? null;
},
componentInstanceContext: WorkflowVisualizerComponentInstanceContext,
});