Skip to content

Commit 4a7765e

Browse files
committed
improvement(knowledge): use canonical ChipDatePicker in document tags modal
The document tags modal used the legacy DatePicker primitive for date-typed tag values while the rest of the knowledge base date inputs use the canonical ChipDatePicker. Swap both usages (edit + create) to ChipDatePicker (same YYYY-MM-DD value contract, full-width to match sibling fields) so the chrome matches the chip design system, and align a tag-row value label to the caption text size used by its sibling.
1 parent a1d5870 commit 4a7765e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
Badge,
77
Button,
88
ChipCombobox,
9+
ChipDatePicker,
910
ChipInput,
1011
ChipModal,
1112
ChipModalBody,
1213
ChipModalField,
1314
ChipModalFooter,
1415
ChipModalHeader,
15-
DatePicker,
1616
Label,
1717
Trash,
1818
} from '@/components/emcn'
@@ -411,7 +411,7 @@ export function DocumentTagsModal({
411411
{FIELD_TYPE_LABELS[tag.fieldType] || tag.fieldType}
412412
</span>
413413
<div className='mb-[-1.5px] h-[14px] w-[1.25px] flex-shrink-0 rounded-full bg-[var(--border-1)]' />
414-
<span className='min-w-0 flex-1 truncate text-[var(--text-muted)] text-xs'>
414+
<span className='min-w-0 flex-1 truncate text-[var(--text-muted)] text-caption'>
415415
{formatValueForDisplay(tag.value, tag.fieldType)}
416416
</span>
417417
<div className='flex flex-shrink-0 items-center gap-1'>
@@ -524,10 +524,11 @@ export function DocumentTagsModal({
524524
}}
525525
/>
526526
) : editTagForm.fieldType === 'date' ? (
527-
<DatePicker
527+
<ChipDatePicker
528528
value={editTagForm.value || undefined}
529529
onChange={(value) => setEditTagForm({ ...editTagForm, value })}
530530
placeholder='Select date'
531+
fullWidth
531532
/>
532533
) : (
533534
<ChipInput
@@ -676,10 +677,11 @@ export function DocumentTagsModal({
676677
}}
677678
/>
678679
) : editTagForm.fieldType === 'date' ? (
679-
<DatePicker
680+
<ChipDatePicker
680681
value={editTagForm.value || undefined}
681682
onChange={(value) => setEditTagForm({ ...editTagForm, value })}
682683
placeholder='Select date'
684+
fullWidth
683685
/>
684686
) : (
685687
<ChipInput

0 commit comments

Comments
 (0)