-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui): Misc improvements to the setup ingestion flow (ingest u…
…plift 1/2) (#10764) Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]>
- Loading branch information
1 parent
18969a5
commit 1e32d73
Showing
19 changed files
with
490 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
datahub-web-react/src/app/ingest/source/builder/DataPlatformCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from 'react'; | ||
import { Button, Image } from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
import { REDESIGN_COLORS } from '../../../entity/shared/constants'; | ||
|
||
const Container = styled(Button)` | ||
padding: 32px; | ||
height: 200px; | ||
display: flex; | ||
justify-content: center; | ||
border-radius: 8px; | ||
align-items: start; | ||
flex-direction: column; | ||
border: 1px solid #e0e0e0; | ||
background-color: #ffffff; | ||
&&:hover { | ||
border: 1px solid ${REDESIGN_COLORS.BLUE}; | ||
background-color: #ffffff; | ||
} | ||
white-space: unset; | ||
`; | ||
|
||
const PlatformLogo = styled(Image)` | ||
max-height: 32px; | ||
height: 32px; | ||
width: auto; | ||
object-fit: contain; | ||
background-color: transparent; | ||
`; | ||
|
||
const LogoContainer = styled.div` | ||
margin-bottom: 14px; | ||
`; | ||
|
||
const Title = styled.div` | ||
word-break: break-word; | ||
color: #464646; | ||
font-weight: bold; | ||
font-size: 16px; | ||
margin-bottom: 8px; | ||
`; | ||
|
||
const Description = styled.div` | ||
word-break: break-word; | ||
text-align: left; | ||
color: #7c7c7c; | ||
`; | ||
|
||
type Props = { | ||
logoUrl?: string; | ||
logoComponent?: React.ReactNode; | ||
name: string; | ||
description?: string; | ||
onClick?: () => void; | ||
}; | ||
|
||
export const DataPlatformCard = ({ logoUrl, logoComponent, name, description, onClick }: Props) => { | ||
return ( | ||
<Container type="link" onClick={onClick}> | ||
<LogoContainer> | ||
{(logoUrl && <PlatformLogo preview={false} src={logoUrl} alt={name} />) || logoComponent} | ||
</LogoContainer> | ||
<Title>{name}</Title> | ||
<Description>{description}</Description> | ||
</Container> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
datahub-web-react/src/app/ingest/source/builder/IngestionDocumentationHint.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { Button, Tooltip } from 'antd'; | ||
import { CloseOutlined } from '@ant-design/icons'; | ||
|
||
import { SourceConfig } from './types'; | ||
import { ANTD_GRAY } from '../../../entity/shared/constants'; | ||
|
||
const Container = styled.div` | ||
background-color: #ffffff; | ||
border-radius: 8px; | ||
padding: 12px 12px 16px 24px; | ||
border: 1px solid #e0e0e0; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
const Header = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 12px; | ||
`; | ||
|
||
const Title = styled.div` | ||
font-size: 16px; | ||
font-weight: bold; | ||
`; | ||
|
||
const Description = styled.div` | ||
font-size: 14px; | ||
max-width: 90%; | ||
`; | ||
|
||
const StyledCloseOutlined = styled(CloseOutlined)` | ||
color: ${ANTD_GRAY[6]}; | ||
`; | ||
|
||
interface Props { | ||
sourceConfigs: SourceConfig; | ||
onHide: () => void; | ||
} | ||
|
||
export const IngestionDocumentationHint = ({ sourceConfigs, onHide }: Props) => { | ||
const { displayName, docsUrl } = sourceConfigs; | ||
return ( | ||
<Container> | ||
<Header> | ||
<Title>Let's get connected! 🎉</Title> | ||
<Tooltip showArrow={false} title="Hide"> | ||
<Button type="text" icon={<StyledCloseOutlined />} onClick={onHide} /> | ||
</Tooltip> | ||
</Header> | ||
<Description> | ||
<div style={{ marginBottom: 8 }}> | ||
To import from {displayName}, we'll need some more information to connect to your instance. | ||
</div> | ||
<div> | ||
Check out the{' '} | ||
<a href={docsUrl} target="_blank" rel="noopener noreferrer"> | ||
{displayName} Guide | ||
</a>{' '} | ||
to understand the prerequisites, learn about available settings, and view examples to help connect | ||
to the data source. | ||
</div> | ||
</Description> | ||
</Container> | ||
); | ||
}; |
Oops, something went wrong.