Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ui): Misc improvements to the setup ingestion flow (ingest uplift 1/2) #10764

Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5f127c2
Adding refactoring to the authoring flow on ingestion sources
Jun 22, 2024
4dc1f6e
Merge remote-tracking branch 'acryl/jj--refactor-pre-ingestion-run-st…
Jun 22, 2024
2cba85e
Adding missing files
Jun 24, 2024
bb88a86
Merge remote-tracking branch 'acryl/jj--refactor-pre-ingestion-run-st…
Jun 24, 2024
3de0b22
fix lint
Jun 24, 2024
03d7d7f
Merge remote-tracking branch 'acryl/jj--refactor-pre-ingestion-run-st…
Jun 24, 2024
02a8ab0
Adding formatter
Jun 24, 2024
800f1a3
Adding test fixes
Jun 24, 2024
ada7c2c
Update IngestionSourceBuilderModal.tsx
jjoyce0510 Jun 24, 2024
58cbcb7
Attempt to fix smoke tests
Jun 25, 2024
8a5bdfc
Finalize test fixups
Jun 25, 2024
88b12ba
Minor - update to use new scroll command
Jun 25, 2024
dad7f0d
Update commands.js
jjoyce0510 Jun 25, 2024
68cf0a3
Update commands.js
jjoyce0510 Jun 25, 2024
82a0b65
Adding prettier formatting
Jun 25, 2024
20a97d4
Update SelectTemplateStep.tsx
jjoyce0510 Jun 25, 2024
04068b9
Force click the visible thing
Jun 26, 2024
287c8c4
Force clear
Jun 26, 2024
016fcef
Adding some polish
Jun 26, 2024
4782fd5
Adding more focused
Jun 26, 2024
b0b7dba
Adding change
Jun 27, 2024
0e031d4
Adding timeout
Jun 27, 2024
e5af95d
Add click timeout as well
Jun 27, 2024
509795f
Update TimezoneSelect.tsx
jjoyce0510 Jun 27, 2024
7b3493b
Update sources.json
jjoyce0510 Jun 27, 2024
2abe8fc
prettier
Jun 27, 2024
b6cd98f
Timezone select
Jun 27, 2024
e6c0417
remove the focused focus
Jun 27, 2024
3e693d6
Adding focused
Jun 28, 2024
bba3053
Update IngestionSourceBuilderModal.tsx - set min width
jjoyce0510 Jun 28, 2024
d43c577
Merge branch 'master' into jj--refactor-pre-ingestion-run-steps
jjoyce0510 Jun 28, 2024
ce26037
try to force it more
Jun 28, 2024
f22d47c
prettier
Jun 28, 2024
51c0f3f
Adding debug
Jun 28, 2024
d72da85
another damn try
Jun 28, 2024
5b34761
Adding changes
Jun 28, 2024
a5d2a9a
Trigger CI again
Jun 28, 2024
a07f837
Update IngestionSourceBuilderModal.tsx
jjoyce0510 Jun 28, 2024
e9a212c
fix monaco
Jun 28, 2024
96ea2b8
Update RecipeBuilder.tsx
jjoyce0510 Jun 28, 2024
30a5868
Update managed_ingestion.js
jjoyce0510 Jul 1, 2024
d63c85e
Add forces
Jul 1, 2024
f17f731
Adding first
Jul 1, 2024
49e6c17
force check
Jul 1, 2024
7759abf
Managed ingestion
Jul 1, 2024
e0b52f0
Final attempt - add more waiting
Jul 1, 2024
92c8fa8
Prettier is lacking
Jul 1, 2024
7276c57
Disabling test that wont pass in CI
Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/ingest/ManageIngestionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export const ManageIngestionPage = () => {
<PageContainer>
<OnboardingTour stepIds={[INGESTION_CREATE_SOURCE_ID, INGESTION_REFRESH_SOURCES_ID]} />
<PageHeaderContainer>
<PageTitle level={3}>Manage Ingestion</PageTitle>
<PageTitle level={3}>Manage Data Sources</PageTitle>
<Typography.Paragraph type="secondary">
Create, schedule, and run DataHub ingestion sources.
Configure and schedule syncs to import data from your data sources
</Typography.Paragraph>
</PageHeaderContainer>
<StyledTabs activeKey={selectedTab} size="large" onTabClick={(tab: string) => onClickTab(tab)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { TimezoneSelect } from './TimezoneSelect';
import { ANTD_GRAY, REDESIGN_COLORS } from '../../../entity/shared/constants';
import { lowerFirstLetter } from '../../../shared/textUtil';
import { IngestionSourceBuilderStep } from './steps';
import { RequiredFieldForm } from '../../../shared/form/RequiredFieldForm';

const Section = styled.div`
display: flex;
Expand All @@ -31,10 +32,25 @@ const CronText = styled(Typography.Paragraph)`
color: ${ANTD_GRAY[7]};
`;

const CronInput = styled(Input)`
margin-bottom: 8px;
max-width: 200px;
`;

const Schedule = styled.div`
display: flex;
align-items: center;
justify-content: start;
`;

const AdvancedSchedule = styled.div`
margin-left: 20px;
`;

const AdvancedCheckBox = styled(Typography.Text)`
margin-right: 10px;
margin-bottom: 8px;
`;

const CronSuccessCheck = styled(CheckCircleOutlined)`
color: ${REDESIGN_COLORS.BLUE};
margin-right: 4px;
Expand Down Expand Up @@ -123,9 +139,9 @@ export const CreateScheduleStep = ({ state, updateState, goTo, prev }: StepProps
<Section>
<SelectTemplateHeader level={5}>Configure an Ingestion Schedule</SelectTemplateHeader>
</Section>
<Form layout="vertical">
<RequiredFieldForm layout="vertical">
<Form.Item
tooltip="Enable to run ingestion on a schedule. Running ingestion on a schedule helps to keep the information inside of DataHub up to date."
tooltip="Enable to run ingestion syncs on a schedule. Running syncs on a schedule helps to keep information up to date."
label={
<Typography.Text strong>
Run on a schedule <Typography.Text type="secondary">(Recommended)</Typography.Text>
Expand All @@ -141,29 +157,31 @@ export const CreateScheduleStep = ({ state, updateState, goTo, prev }: StepProps
)}
</Form.Item>
<StyledFormItem required label={<Typography.Text strong>Schedule</Typography.Text>}>
<div style={{ paddingBottom: 10, paddingLeft: 10 }}>
<AdvancedCheckBox type="secondary">Advanced</AdvancedCheckBox>
<Checkbox
checked={advancedCronCheck}
onChange={(event) => setAdvancedCronCheck(event.target.checked)}
/>
</div>
{advancedCronCheck ? (
<Input
placeholder={DAILY_MIDNIGHT_CRON_INTERVAL}
autoFocus
value={scheduleCronInterval}
onChange={(e) => setScheduleCronInterval(e.target.value)}
/>
) : (
<Cron
value={scheduleCronInterval}
setValue={setScheduleCronInterval}
clearButton={false}
className="cron-builder"
leadingZero
/>
)}
<Schedule>
{advancedCronCheck ? (
<CronInput
placeholder={DAILY_MIDNIGHT_CRON_INTERVAL}
autoFocus
value={scheduleCronInterval}
onChange={(e) => setScheduleCronInterval(e.target.value)}
/>
) : (
<Cron
value={scheduleCronInterval}
setValue={setScheduleCronInterval}
clearButton={false}
className="cron-builder"
leadingZero
/>
)}
<AdvancedSchedule>
<AdvancedCheckBox type="secondary">Show Advanced</AdvancedCheckBox>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nit but for some reason checkbox seems unintuitive. I'd expect it on a new line with a chevron down (collapsible/accordion style)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I felt that it was too much vertical with that and the "Runs at" stacked on one another.

Previously this checkbox was directly above the schedule builder, which I also didn't like..

<Checkbox
checked={advancedCronCheck}
onChange={(event) => setAdvancedCronCheck(event.target.checked)}
/>
</AdvancedSchedule>
</Schedule>
<CronText>
{cronAsText.error && <>Invalid cron schedule. Cron must be of UNIX form:</>}
{!cronAsText.text && (
Expand All @@ -183,14 +201,15 @@ export const CreateScheduleStep = ({ state, updateState, goTo, prev }: StepProps
<ItemDescriptionText>Choose a timezone for the schedule.</ItemDescriptionText>
<TimezoneSelect value={scheduleTimezone} onChange={setScheduleTimezone} />
</Form.Item>
</Form>
</RequiredFieldForm>
<ControlsContainer>
<Button onClick={prev}>Previous</Button>
<div>
<Button
data-testid="ingestion-schedule-next-button"
disabled={!interval || interval.length === 0 || cronAsText.error}
onClick={onClickNext}
type="primary"
>
Next
</Button>
Expand Down
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>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const DefineRecipeStep = ({ state, updateState, goTo, prev, ingestionSour
<Button disabled={isEditing} onClick={prev}>
Previous
</Button>
<Button disabled={!stepComplete} onClick={onClickNext}>
<Button type="primary" disabled={!stepComplete} onClick={onClickNext}>
Next
</Button>
</ControlsContainer>
Expand Down
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&apos;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&apos;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>
);
};
Loading
Loading