-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Table and Column Lineage Polish (#970)
Cleanup / polish of lineage features - Reordeered upstream/downstream tabs - Hide upstream/downstream tabs when no tables are found - Add loading state for column lineage
- Loading branch information
Daniel
committed
Apr 14, 2021
1 parent
072d531
commit cd2f4c4
Showing
14 changed files
with
255 additions
and
61 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
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
37 changes: 37 additions & 0 deletions
37
amundsen_application/static/js/features/ColumnList/ColumnLineageLoader/index.spec.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,37 @@ | ||
// Copyright Contributors to the Amundsen project. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import ColumnLineageLoader from '.'; | ||
|
||
const setup = () => { | ||
const wrapper = shallow(<ColumnLineageLoader />); | ||
|
||
return wrapper; | ||
}; | ||
|
||
describe('ColumnLineageLoader', () => { | ||
describe('render', () => { | ||
it('should render without errors', () => { | ||
expect(() => { | ||
setup(); | ||
}).not.toThrow(); | ||
}); | ||
|
||
it('should render two columns', () => { | ||
const expected = 2; | ||
const actual = setup().find('.shimmer-loader-column').length; | ||
|
||
expect(actual).toEqual(expected); | ||
}); | ||
|
||
it('should render four cells', () => { | ||
const expected = 4; | ||
const actual = setup().find('.shimmer-loader-cell').length; | ||
|
||
expect(actual).toEqual(expected); | ||
}); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
amundsen_application/static/js/features/ColumnList/ColumnLineageLoader/index.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,21 @@ | ||
// Copyright Contributors to the Amundsen project. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import * as React from 'react'; | ||
|
||
import './styles.scss'; | ||
|
||
const ColumnLineageLoader: React.FC = () => ( | ||
<div className="column-lineage-loader"> | ||
<div className="shimmer-loader-column"> | ||
<div className="shimmer-loader-cell header is-shimmer-animated" /> | ||
<div className="shimmer-loader-cell content is-shimmer-animated" /> | ||
</div> | ||
<div className="shimmer-loader-column"> | ||
<div className="shimmer-loader-cell header is-shimmer-animated" /> | ||
<div className="shimmer-loader-cell content is-shimmer-animated" /> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default ColumnLineageLoader; |
46 changes: 46 additions & 0 deletions
46
amundsen_application/static/js/features/ColumnList/ColumnLineageLoader/styles.scss
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,46 @@ | ||
// Copyright Contributors to the Amundsen project. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
@import 'variables'; | ||
|
||
$shimmer-height: 120px; | ||
$shimmer-block-spacing: $spacer-1; | ||
$shimmer-max-width: 800px; | ||
$shimmer-header-height: 24px; | ||
|
||
.column-lineage-loader { | ||
display: flex; | ||
height: $shimmer-height; | ||
margin-top: $shimmer-block-spacing; | ||
max-width: $shimmer-max-width; | ||
|
||
.shimmer-loader-column { | ||
display: flex; | ||
flex-basis: 45%; | ||
flex-direction: column; | ||
height: 100%; | ||
margin-right: $shimmer-block-spacing; | ||
|
||
&:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.shimmer-loader-cell { | ||
margin-bottom: $shimmer-block-spacing; | ||
|
||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
&.header { | ||
height: $shimmer-header-height; | ||
} | ||
|
||
&.content { | ||
height: ( | ||
$shimmer-height - $shimmer-header-height - $shimmer-block-spacing | ||
); | ||
} | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.