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: Adds expandable feature to table #654

Merged
merged 10 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions amundsen_application/static/.betterer.results
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ exports[`strict null compilation`] = {
[255, 6, 11, "No overload matches this call.\\n The last overload gave the following error.\\n Type \'(() => SubmitSearchRequest) | null\' is not assignable to type \'ActionCreator<any>\'.\\n Type \'null\' is not assignable to type \'ActionCreator<any>\'.", "2296208050"],
[270, 4, 18, "No overload matches this call.\\n The last overload gave the following error.\\n Argument of type \'(dispatch: any, ownProps: any) => ActionCreator<unknown>\' is not assignable to parameter of type \'DispatchFromProps\'.\\n Type \'(dispatch: any, ownProps: any) => ActionCreator<unknown>\' is missing the following properties from type \'DispatchFromProps\': submitSearch, onInputChange, onSelectInlineResult", "2926224796"]
],
"js/components/common/Table/index.tsx:2876532157": [
[127, 18, 13, "Type \'unknown\' is not assignable to type \'ReactNode\'.\\n Type \'unknown\' is not assignable to type \'ReactPortal\'.", "971959308"]
"js/components/common/Table/index.tsx:2645527205": [
[190, 22, 13, "Type \'unknown\' is not assignable to type \'ReactNode\'.\\n Type \'unknown\' is not assignable to type \'ReactPortal\'.", "971959308"]
],
"js/components/common/Tags/TagInput/index.tsx:3754832290": [
[63, 22, 6, "Type \'undefined\' is not assignable to type \'GetAllTagsRequest\'.", "1979467425"],
Expand Down Expand Up @@ -364,8 +364,8 @@ exports[`strict null compilation`] = {
"js/utils/navigationUtils.ts:1127210474": [
[19, 50, 21, "Type \'undefined\' cannot be used as an index type.", "602535635"]
],
"webpack.common.ts:545199363": [
[33, 24, 20, "No overload matches this call.\\n Overload 1 of 2, \'(...items: ConcatArray<never>[]): never[]\', gave the following error.\\n Argument of type \'string\' is not assignable to parameter of type \'ConcatArray<never>\'.\\n Overload 2 of 2, \'(...items: ConcatArray<never>[]): never[]\', gave the following error.\\n Argument of type \'string\' is not assignable to parameter of type \'ConcatArray<never>\'.", "806093104"]
"webpack.common.ts:368637609": [
[34, 24, 20, "No overload matches this call.\\n Overload 1 of 2, \'(...items: ConcatArray<never>[]): never[]\', gave the following error.\\n Argument of type \'string\' is not assignable to parameter of type \'ConcatArray<never>\'.\\n Overload 2 of 2, \'(...items: ConcatArray<never>[]): never[]\', gave the following error.\\n Argument of type \'string\' is not assignable to parameter of type \'ConcatArray<never>\'.", "806093104"]
]
}`
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

import * as React from 'react';

import { AlertIcon, IconSizes } from '../SVGIcons';
import { AlertIcon } from '../SVGIcons';
import { IconSizes } from '../SVGIcons/types';

import './styles.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

.resource-list-header {
@extend %text-caption-w2;

display: flex;
flex-direction: row;
align-items: center;
Expand All @@ -15,18 +16,22 @@
.dataset {
flex: 7;
margin-right: $spacer-2;

.dataset-text {
margin-left: $spacer-5;
}
}

.source {
flex: 2;
}

.badges {
display: flex;
flex: 3;
flex-wrap: wrap;
margin-left: $spacer-3;

.badges-text {
margin-left: $spacer-3;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@

import * as React from 'react';

import { IconSizes } from '.';
import { IconSizes, IconProps } from './types';

const DEFAULT_STROKE_COLOR = 'currentColor';

export interface IconProps {
stroke?: string;
size?: number;
}

export const AlertIcon: React.FC<IconProps> = ({
stroke = DEFAULT_STROKE_COLOR,
size = IconSizes.REGULAR,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0

import * as React from 'react';

import { IconSizes, IconProps } from './types';

const DEFAULT_STROKE_COLOR = '';
const DEFAULT_FILL_COLOR = '#D6D9DB';

export const DownIcon: React.FC<IconProps> = ({
stroke = DEFAULT_STROKE_COLOR,
size = IconSizes.REGULAR,
fill = DEFAULT_FILL_COLOR,
}: IconProps) => {
return (
<svg width={size} height={size} viewBox="0 0 24 24">
<title>Down</title>
<defs>
<path
d="M11.987 13.73l4.051-3.918a1.017 1.017 0 011.426.012.983.983 0 01-.012 1.403l-4.733 4.578a1.013 1.013 0 01-.63.283 1.024 1.024 0 01-.814-.277l-4.833-4.59a.975.975 0 01-.018-1.397 1.026 1.026 0 011.432-.018l4.131 3.924z"
id="prefix__a"
/>
</defs>
<g fill="none" fillRule="evenodd">
<mask id="prefix__b" fill="#fff">
<use xlinkHref="#prefix__a" />
</mask>
<use fill={fill} xlinkHref="#prefix__a" stroke={stroke} />
</g>
</svg>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0

import * as React from 'react';

import { IconSizes, IconProps } from './types';

const DEFAULT_STROKE_COLOR = '';
const DEFAULT_FILL_COLOR = '#D6D9DB';

export const UpIcon: React.FC<IconProps> = ({
stroke = DEFAULT_STROKE_COLOR,
size = IconSizes.REGULAR,
fill = DEFAULT_FILL_COLOR,
}: IconProps) => {
return (
<svg width={size} height={size} viewBox="0 0 24 24">
<title>Up</title>
<defs>
<path
d="M12.097 12.12l4.049-3.898a1.02 1.02 0 011.427.014.981.981 0 01-.013 1.4l-4.73 4.553c-.18.174-.41.268-.642.283a1.026 1.026 0 01-.805-.276L6.553 9.63a.972.972 0 01-.02-1.394 1.028 1.028 0 011.434-.02l4.13 3.904z"
id="prefix__a"
/>
</defs>
<g fill="none" fillRule="evenodd">
<mask id="prefix__b" fill="#fff">
<use xlinkHref="#prefix__a" />
</mask>
<use
fill={fill}
stroke={stroke}
transform="rotate(-180 12.055 11.206)"
xlinkHref="#prefix__a"
/>
</g>
</svg>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
// SPDX-License-Identifier: Apache-2.0

export * from './AlertIcon';

export enum IconSizes {
REGULAR = 24,
SMALL = 16,
}
export * from './DownIcon';
export * from './UpIcon';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
import { storiesOf } from '@storybook/react';

import StorySection from '../StorySection';
import { AlertIcon } from '.';
import { AlertIcon, DownIcon, UpIcon } from '.';

const stories = storiesOf('Attributes/Iconography', module);

Expand All @@ -14,5 +14,11 @@ stories.add('SVG Icons', () => (
<StorySection title="Alert">
<AlertIcon />
</StorySection>
<StorySection title="Down">
<DownIcon />
</StorySection>
<StorySection title="Up">
<UpIcon />
</StorySection>
</>
));
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0

export enum IconSizes {
REGULAR = 24,
SMALL = 16,
}

export interface IconProps {
stroke?: string;
size?: number;
fill?: string;
}
Loading