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

feat(ui): looker, lookml - add banner to cross-link ingestion #6111

Conversation

Ankit-Keshari-Vituity
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Oct 4, 2022
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

Unit Test Results (build & test)

597 tests  +13   593 ✔️ +13   11m 41s ⏱️ - 1m 15s
147 suites +  4       4 💤 ±  0 
147 files   +  4       0 ±  0 

Results for commit 2454d51. ± Comparison against base commit bea5a07.

♻️ This comment has been updated with latest results.

<CodeOutlined /> YAML
</StyledButton>
</ButtonsWrapper>
{(type === 'looker' || type === 'lookml') && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would use constants defined in src/app/ingest/source/builder/constants.ts here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked and fixed!!

Comment on lines 94 to 111
<Alert
type="warning"
banner
message={
<>
<big>
<i>
<b>You must acknowledge this message to proceed!</b>
</i>
</big>
<br />
<br />
To get complete Looker metadata integration (including Looker views and lineage to the
underlying warehouse tables), you must <b>also</b> use the {link}.
</>
}
/>
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can move this as well as the logic above regarding link into a new file and component called LookerWarning or something to keep this component a little cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created and fixed.

Comment on lines 99 to 105
<big>
<i>
<b>You must acknowledge this message to proceed!</b>
</i>
</big>
<br />
<br />
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you need this part here anymore!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these lines and implemented them in a new component "LookerWarning".

Comment on lines 112 to 126
<Row style={{ marginBottom: '10px' }}>
<Col xl={8} lg={8} md={8} sm={24} xs={24}>
<Title level={5}>{sourceConfigs?.displayName} Recipe</Title>
</Col>
<Col xl={16} lg={16} md={16} sm={24} xs={24}>
<ButtonsWrapper>
<StyledButton type="text" isSelected={isViewingForm} onClick={() => switchViews(true)}>
<FormOutlined /> Form
</StyledButton>
<StyledButton type="text" isSelected={!isViewingForm} onClick={() => switchViews(false)}>
<CodeOutlined /> YAML
</StyledButton>
</ButtonsWrapper>
</Col>
</Row>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nothing wrong with using Row and Col here - just curious why you decided on that instead of just wrapping Title and ButtonsWrapper in a parent div with display: flex; justify-content: space-between; margin-bottom: 10px;?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is another solution to implement this. I only used Row and Col at that time.

@shirshanka shirshanka changed the title Ingestion header modification feat(ui): looker, lookml - add banner to cross-link ingestion Oct 6, 2022
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

Nice! just two quick tweaks and this will be good to go

Comment on lines 14 to 26
if (type === LOOKER) {
link = (
<a href={LOOKER_DOC_LINK} target="_blank" rel="noopener noreferrer">
DataHub looker module
</a>
);
} else if (type === LOOK_ML) {
link = (
<a href={LOOKML_DOC_LINK} target="_blank" rel="noopener noreferrer">
DataHub lookml module
</a>
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you swap these two links? If they're on the Looker form, we need to tell them to also use the LookML module. Then if they're on the LookML form, we need to tell them to use the Looker module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked and fixed it!!

</ButtonsWrapper>
{(type === LOOKER || type === LOOK_ML) && <LookerWarning type={type} />}
<HeaderContainer>
<Title level={5}>{sourceConfigs?.displayName} Recipe</Title>
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add style={{ marginBottom: 0 }} as an inline style to Title here? For some reason ant design always adds margin to the bottom of Typography.Title and you can't remove it using styled components so you have to do it inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked and fixed!!

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

nice!

@chriscollins3456 chriscollins3456 merged commit 21c1d37 into datahub-project:master Oct 11, 2022
cccs-tom pushed a commit to CybercentreCanada/datahub that referenced this pull request Nov 18, 2022
cccs-tom pushed a commit to CybercentreCanada/datahub that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants