Skip to content

Commit 84691fc

Browse files
authored
improvement(modal): fixed popover issue in custom tools modal, removed the ability to update if no changes made (#2897)
* improvement(modal): fixed popover issue in custom tools modal, removed the ability to update if no changes made * improvement(modal): fixed popover issue in custom tools modal, removed the ability to update if no changes made * popover fixes, color picker keyboard nav, code simplification * color standardization * fix color picker * set discard alert state when closing modal
1 parent 2daf343 commit 84691fc

File tree

15 files changed

+141
-152
lines changed

15 files changed

+141
-152
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,15 @@ export function BaseTagsModal({ open, onOpenChange, knowledgeBaseId }: BaseTagsM
462462
<ModalHeader>Documents using "{selectedTag?.displayName}"</ModalHeader>
463463
<ModalBody>
464464
<div className='space-y-[8px]'>
465-
<p className='text-[12px] text-[var(--text-tertiary)]'>
465+
<p className='text-[12px] text-[var(--text-secondary)]'>
466466
{selectedTagUsage?.documentCount || 0} document
467467
{selectedTagUsage?.documentCount !== 1 ? 's are' : ' is'} currently using this tag
468468
definition.
469469
</p>
470470

471471
{selectedTagUsage?.documentCount === 0 ? (
472472
<div className='rounded-[6px] border p-[16px] text-center'>
473-
<p className='text-[12px] text-[var(--text-tertiary)]'>
473+
<p className='text-[12px] text-[var(--text-secondary)]'>
474474
This tag definition is not being used by any documents. You can safely delete it
475475
to free up the tag slot.
476476
</p>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export function GeneralDeploy({
283283
<ModalContent size='sm'>
284284
<ModalHeader>Promote to live</ModalHeader>
285285
<ModalBody>
286-
<p className='text-[12px] text-[var(--text-tertiary)]'>
286+
<p className='text-[12px] text-[var(--text-secondary)]'>
287287
Are you sure you want to promote{' '}
288288
<span className='font-medium text-[var(--text-primary)]'>
289289
{versionToPromoteInfo?.name || `v${versionToPromote}`}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,11 @@ export function DeployModal({
591591
)}
592592
{activeTab === 'api' && (
593593
<ModalFooter className='items-center justify-between'>
594-
<div>
594+
<div />
595+
<div className='flex items-center gap-2'>
595596
<Button variant='default' onClick={() => setIsApiInfoModalOpen(true)}>
596597
Edit API Info
597598
</Button>
598-
</div>
599-
<div className='flex items-center gap-2'>
600599
<Button
601600
variant='tertiary'
602601
onClick={() => setIsCreateKeyModalOpen(true)}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function CodeEditor({
4242
placeholder = '',
4343
className = '',
4444
gutterClassName = '',
45-
minHeight = '360px',
45+
minHeight,
4646
highlightVariables = true,
4747
onKeyDown,
4848
disabled = false,
@@ -186,7 +186,7 @@ export function CodeEditor({
186186
}
187187

188188
return (
189-
<Code.Container className={className} style={{ minHeight }}>
189+
<Code.Container className={className} style={minHeight ? { minHeight } : undefined}>
190190
{showWandButton && onWandClick && (
191191
<Button
192192
variant='ghost'
@@ -220,7 +220,7 @@ export function CodeEditor({
220220
disabled={disabled}
221221
{...getCodeEditorProps({ disabled })}
222222
className={cn(getCodeEditorProps({ disabled }).className, 'h-full')}
223-
style={{ minHeight }}
223+
style={minHeight ? { minHeight } : undefined}
224224
textareaClassName={cn(
225225
getCodeEditorProps({ disabled }).textareaClassName,
226226
'!block !h-full !min-h-full'

0 commit comments

Comments
 (0)