Fix the design of the Variable chip (#9871)

- Use a React component for variable tags in tiptap
- Fix the design of the variable chip
- Always display a button to delete the chip

![CleanShot 2025-01-28 at 12 35
55@2x](https://github.com/user-attachments/assets/d78ffa52-fcc3-4bbc-b427-68edde255408)
This commit is contained in:
Baptiste Devessier
2025-01-28 14:59:45 +01:00
committed by GitHub
parent ac8c0c72cc
commit 1e9dce3fd5
12 changed files with 91 additions and 50 deletions

View File

@ -1,6 +1,6 @@
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { RecordChip } from '@/object-record/components/RecordChip';
import { VariableChip } from '@/object-record/record-field/form-types/components/VariableChip';
import { VariableChipStandalone } from '@/object-record/record-field/form-types/components/VariableChipStandalone';
import { ObjectRecord } from '@/object-record/types/ObjectRecord';
import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';
import {
@ -48,7 +48,7 @@ export const WorkflowSingleRecordFieldChip = ({
isStandaloneVariableString(draftValue.value)
) {
return (
<VariableChip
<VariableChipStandalone
rawVariableName={objectMetadataItem.labelSingular}
onRemove={onRemove}
/>