Skip to content

Commit b500b44

Browse files
author
John Joyce
committed
Adding button fixes for assertions
1 parent 3aa042e commit b500b44

File tree

11 files changed

+20
-29
lines changed

11 files changed

+20
-29
lines changed

datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/DatasetAssertionsList.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ export const DatasetAssertionsList = ({
198198
EntityType.Dataset,
199199
entityData.urn,
200200
)}/Quality/Data Contract`}
201-
style={{ color: REDESIGN_COLORS.BLUE }}
202201
>
203-
view
202+
View
204203
</Link>
205204
</>
206205
}

datahub-web-react/src/app/entityV2/shared/components/search/InlineListSearch.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { SearchOutlined } from '@ant-design/icons';
21
import React from 'react';
32
import { pluralize } from '@src/app/shared/textUtil';
43
import { MatchLabelText, SearchContainer, StyledInput } from './styledComponents';
@@ -28,12 +27,10 @@ export const InlineListSearch: React.FC<InlineListSearchProps> = ({
2827
return (
2928
<SearchContainer>
3029
<StyledInput
31-
bordered={false}
3230
value={searchText}
3331
placeholder={options?.placeholder || 'Search...'}
3432
onChange={debouncedSetFilterText}
35-
allowClear
36-
prefix={!options?.hidePrefix && <SearchOutlined />}
33+
label=""
3734
/>
3835
{searchText && !options?.hideMatchCountText && (
3936
<MatchLabelText>

datahub-web-react/src/app/entityV2/shared/components/search/styledComponents.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Input } from 'antd';
21
import styled from 'styled-components';
2+
import { Input } from '@src/alchemy-components';
33
import { REDESIGN_COLORS } from '../../constants';
44

55
export const StyledInput = styled(Input)`
@@ -15,6 +15,7 @@ export const MatchLabelText = styled.span`
1515
font-size: 12px;
1616
font-weight: 400;
1717
color: ${REDESIGN_COLORS.DARK_GREY};
18+
padding: 4px 4px;
1819
`;
1920

2021
export const SearchContainer = styled.div`

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/AcrylAssertionsTableColumns.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ export function DetailsColumn({ assertion, contract, lastEvaluation, onViewAsser
8383
EntityType.Dataset,
8484
entityData.urn,
8585
)}/Quality/Data Contract`}
86-
style={{ color: REDESIGN_COLORS.BLUE }}
8786
>
88-
view
87+
View
8988
</Link>
9089
</>
9190
}

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/AssertionList/AssertionListTitleContainer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import styled from 'styled-components';
55
const AssertionTitleContainer = styled.div`
66
display: flex;
77
justify-content: space-between;
8+
align-items: center;
89
margin: 20px;
9-
height: 50px;
1010
div {
1111
border-bottom: 0px;
1212
}

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/AssertionList/DataContractBadge.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import React from 'react';
22
import { AuditOutlined } from '@ant-design/icons';
3-
import { REDESIGN_COLORS } from '@src/app/entity/shared/constants';
4-
import { Tooltip } from '@components';
3+
import { colors, Tooltip } from '@components';
54
import { Link } from 'react-router-dom';
65
import styled from 'styled-components';
76

87
const DataContractLogo = styled(AuditOutlined)`
98
margin-left: 8px;
109
font-size: 16px;
11-
color: ${REDESIGN_COLORS.BLUE};
10+
color: ${colors.violet[500]};
1211
`;
12+
1313
export const DataContractBadge = ({ link }: { link: string }) => {
1414
return (
1515
<Tooltip
1616
title={
1717
<>
1818
Part of Data Contract{' '}
19-
<Link to={link} style={{ color: REDESIGN_COLORS.BLUE }}>
20-
view
19+
<Link to={link} style={{ color: colors.gray[300] }}>
20+
View
2121
</Link>
2222
</>
2323
}

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/AssertionList/Tags/AcrylAssertionTagColumn.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import DataHubTooltip from '@src/alchemy-components/components/Tooltip/Tooltip';
1515
const StyledTagContainer = styled.div`
1616
display: flex;
1717
align-items: center;
18-
justify-content: center;
18+
justify-content: start;
1919
flex-wrap: wrap;
2020
cursor: pointer;
2121
gap: 4px;

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/assertion/profile/actions/ActionItem.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@ import React from 'react';
22
import { Tooltip } from '@components';
33
import { TooltipPlacement } from 'antd/es/tooltip';
44
import styled from 'styled-components';
5-
import { ActionItemButton } from './styledComponents';
5+
import { ActionMenuItem } from '@src/app/entityV2/shared/EntityDropdown/styledComponents';
66

77
const StyledActionButtonContainer = styled.div`
88
display: flex;
99
align-items: center;
1010
gap: 8px;
11-
color: #46507b;
1211
`;
1312

1413
type Props = {
15-
primary?: boolean;
1614
tip?: string;
1715
disabled?: boolean;
1816
onClick: () => void;
@@ -25,7 +23,6 @@ type Props = {
2523
};
2624

2725
export const ActionItem = ({
28-
primary = false,
2926
tip,
3027
disabled = false,
3128
onClick,
@@ -39,23 +36,20 @@ export const ActionItem = ({
3936
return (
4037
<Tooltip placement={placement} title={isExpandedView ? '' : tip}>
4138
<StyledActionButtonContainer
42-
style={{ cursor: disabled ? 'not-allowed' : 'pointer' }}
4339
onClick={(e) => {
4440
e.stopPropagation();
4541
if (disabled) return;
4642
onClick();
4743
}}
4844
>
49-
<ActionItemButton
50-
primary={primary}
45+
<ActionMenuItem
5146
key={key}
5247
disabled={disabled}
5348
title={!isExpandedView ? tip : undefined}
54-
isExpandedView={isExpandedView}
5549
data-testid={dataTestId}
5650
>
5751
{icon}
58-
</ActionItemButton>
52+
</ActionMenuItem>
5953
{isExpandedView && actionName && <span>{actionName}</span>}
6054
</StyledActionButtonContainer>
6155
</Tooltip>

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/assertion/profile/actions/AssertionListItemActions.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from 'react';
22
import styled from 'styled-components';
3-
import { Button, Dropdown, Menu } from 'antd';
4-
3+
import { Dropdown, Menu } from 'antd';
4+
import { Button, colors } from '@src/alchemy-components';
5+
import { DotsThreeVertical } from 'phosphor-react';
56
import { Assertion, AssertionRunStatus, DataContract } from '../../../../../../../../../types.generated';
67
import { ContractAction } from './ContractAction';
78
import { CopyLinkAction } from './CopyLinkAction';
@@ -12,7 +13,7 @@ import { useIsOnSiblingsView } from '../../../../../../useIsSeparateSiblingsMode
1213
const ActionList = styled.div<{ $shouldRightAlign?: boolean }>`
1314
display: flex;
1415
align-items: center;
15-
justify-content: center;
16+
justify-content: end;
1617
padding: ${(props) => (props.$shouldRightAlign ? '0px' : '0px 10px')};
1718
margin-left: ${(props) => (props.$shouldRightAlign ? 'auto' : undefined)};
1819
`;

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/assertion/profile/actions/ExternalUrlAction.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const ExternalUrlAction = ({ assertion, isExpandedView = false }: Props)
4747
return (
4848
<ActionItem
4949
key="external-url"
50-
primary
5150
tip={`View in ${platformName}.`}
5251
onClick={handleRedirect}
5352
icon={<StyledLaunchOutlined />}

datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Validations/assertion/profile/actions/styledComponents.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const getColor = ({ isExpandedView, primary }: { isExpandedView?: boolean; prima
1010
if (primary) return '#fff';
1111
return isExpandedView ? '#000' : '#5280e8';
1212
};
13+
1314
const getBorder = ({ isExpandedView, primary }: { isExpandedView?: boolean; primary?: boolean }) => {
1415
if (isExpandedView) return 'none';
1516
return primary ? '1px solid #5280e8' : '1px solid #f0f0f0';

0 commit comments

Comments
 (0)