Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Fix style for inputs active/selected state (#67)
Browse files Browse the repository at this point in the history
* Fix style for inputs active/selected state

* Filter connectors in ag connector so we prevent dups

---------

Co-authored-by: Rodrigo Arze Leon <[email protected]>
  • Loading branch information
Rodri77 and Rodrigo Arze Leon authored Oct 24, 2024
1 parent bcb49cb commit d841056
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions packages/engine-frontend/components/AGConnectionPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {AlertTriangle} from 'lucide-react'
import React from 'react'
import type {Id} from '@openint/cdk'
import type {UIPropsNoChildren} from '@openint/ui'
import { Card, ResourceCard } from '@openint/ui'
import {Card, ResourceCard} from '@openint/ui'
import {cn} from '@openint/ui/utils'
import {R} from '@openint/util'
import {WithConnectConfig} from '../hocs/WithConnectConfig'
import {_trpcReact} from '../providers/TRPCProvider'
import {ConnectDialog} from './ConnectDialog'
import {AgResourceRowActions} from './AgResourceRowActions'
import {ConnectDialog} from './ConnectDialog'

type ConnectEventType = 'open' | 'close' | 'error'

Expand Down Expand Up @@ -48,7 +48,7 @@ const AGConnectionPortalComponent: React.FC<AGConnectionPortalProps> = ({
const handleMessage = React.useCallback(async (event: MessageEvent) => {
if (event.data.type === 'triggerConnectDialog') {
console.log('triggerConnectDialog', event.data.value)
if(event.data.value) {
if (event.data.value) {
await listConnectionsRes.refetch().then(() => {
setOpenDialog(event.data.value)
})
Expand Down Expand Up @@ -122,20 +122,23 @@ const AGConnectionPortalComponent: React.FC<AGConnectionPortalProps> = ({
</ResourceCard>
))}
{category.connections.length === 0 && (
<Card className="drop-shadow-small flex w-full flex-col items-center justify-center space-y-3 rounded-lg border border-solid border-[#e0e0e5] bg-[#f8f8fc] p-6 text-center">
<Card className="drop-shadow-small flex w-full flex-col items-center justify-center space-y-3 rounded-lg border border-solid border-[#e0e0e5] bg-[#f8f8fc] p-6 text-center">
<div className="flex flex-row gap-2">
<AlertTriangle className="size-8 text-[#C27B1A]" />
<h3 className="text-black-dark mb-2 text-[24px] font-semibold leading-[36px] tracking-tight antialiased">
{`No data source connected`}
</h3>
</div>
</Card>
</div>
</Card>
)}
{openDialog && (
<ConnectDialog
connectorConfigFilters={{verticalKey: category.key}}
open={openDialog}
setOpen={setOpenDialog}
connectorNames={category.connections.map(
(c) => c.connectorName,
)}
// trigger refetch of connections
onEvent={() => listConnectionsRes.refetch()}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/SchemaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function generateUiSchema(jsonSchema: RJSFSchema): UiSchema {
const friendlyLabel = titleCase(key)
uiSchema[key] = {
'ui:title': friendlyLabel,
'ui:classNames': 'pt-2 mr-2',
'ui:classNames': 'pt-2 mx-1',
}

if (typeof value === 'object' && isTypeObject(value)) {
Expand Down

1 comment on commit d841056

@vercel
Copy link

@vercel vercel bot commented on d841056 Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.