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

Nuke and build #299

Merged
merged 4 commits into from
Oct 2, 2023
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM node:18-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache python3 make g++
RUN npm i -g node-gyp
WORKDIR /app

# Install dependencies based on the preferred package manager
Expand Down
2 changes: 1 addition & 1 deletion components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const BUTTONS_MAP = {
['text']: TextButton,
};

export interface IButtonProps extends ButtonProps {
export interface IButtonProps extends Omit<ButtonProps, 'key'> {
color: 'primary' | 'secondary' | 'error' | 'info' | 'text';
}

Expand Down
2 changes: 1 addition & 1 deletion components/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ComponentPropsWithoutRef, FunctionComponent } from 'react';

import { CardContainer } from './card.styled';

export interface CardProps extends ComponentPropsWithoutRef<'div'> {
export interface CardProps extends Omit<ComponentPropsWithoutRef<'div'>, 'key'> {
active?: boolean;
withHoverEffect?: boolean;
}
Expand Down
6 changes: 4 additions & 2 deletions components/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';

import { QUARTZ, SPUN_PEARL } from '../../constants/colors';

const Checkbox: FunctionComponent<CheckboxProps> = (props) => (
type ICheckBoxProps = Omit<CheckboxProps, 'key'>;

const Checkbox: FunctionComponent<ICheckBoxProps> = (props) => (
<CheckboxMUI
{...props}
style={{ border: '1px', padding: 0 }}
Expand All @@ -19,7 +21,7 @@ const Checkbox: FunctionComponent<CheckboxProps> = (props) => (
/>
);

const CheckBoxWithRef = React.forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {
const CheckBoxWithRef = React.forwardRef<HTMLInputElement, ICheckBoxProps>((props, ref) => {
return <Checkbox inputRef={ref} {...props} />;
});

Expand Down
1 change: 0 additions & 1 deletion components/clusterDetails/clusterDetails.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import ColumnComponent from '../column';
import RowComponent from '../row';
import Typography from '../typography';
import NextLink from '../nextLink';
import {
CHEFS_HAT,
DR_WHITE,
Expand Down
2 changes: 1 addition & 1 deletion components/clusterDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
StatusContainer,
} from './clusterDetails.styled';

export interface ClusterDetailsProps extends ComponentPropsWithoutRef<'div'> {
export interface ClusterDetailsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'key'> {
cluster: Cluster;
host: ManagementCluster['gitHost'];
gitOwner: ManagementCluster['gitAuth']['gitOwner'];
Expand Down
2 changes: 1 addition & 1 deletion components/clusterTable/clusterTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const ClusterTableHead: FunctionComponent<ClusterTableHeadProps> = ({ orderBy, o
);
};

interface ClusterTableProps extends ComponentPropsWithRef<'tbody'> {
interface ClusterTableProps extends Omit<ComponentPropsWithRef<'tbody'>, 'key'> {
managementCluster: ManagementCluster;
draftCluster?: DraftCluster;
onDeleteCluster: () => void;
Expand Down
3 changes: 2 additions & 1 deletion components/createEnvironmentMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { ClusterEnvironment } from '../../types/provision';

import { CloseButton, Content, Footer, Header, Root } from './createEnvironmentMenu.styled';

interface CreateEnvironmentMenuProps extends Omit<ComponentPropsWithoutRef<'form'>, 'onSubmit'> {
interface CreateEnvironmentMenuProps
extends Omit<ComponentPropsWithoutRef<'form'>, 'onSubmit' | 'key'> {
onSubmit: (environment: ClusterEnvironment) => void;
onClose: () => void;
previouslyCreatedEnvironments?: ClusterEnvironment[];
Expand Down
5 changes: 4 additions & 1 deletion components/drawer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React, { FunctionComponent, PropsWithChildren } from 'react';
import { Drawer as DrawerMui, DrawerProps } from '@mui/material';

const Drawer: FunctionComponent<PropsWithChildren<DrawerProps>> = ({ children, ...rest }) => {
const Drawer: FunctionComponent<Omit<PropsWithChildren<DrawerProps>, 'key'>> = ({
children,
...rest
}) => {
return <DrawerMui {...rest}>{children}</DrawerMui>;
};

Expand Down
2 changes: 1 addition & 1 deletion components/gitProviderButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const PROVIDER_OPTIONS: Record<
[GitProvider.GITLAB]: { logoSrc: gitlabLogo, label: 'GitLab', height: 40, width: 42 },
};

export interface GitProviderButtonProps extends ComponentPropsWithoutRef<'button'> {
export interface GitProviderButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'key'> {
option: GitProvider;
active?: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion components/headsUpNotification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Root,
} from './headsUpNotification.styled';

interface HeadsUpNotificationProps extends ComponentPropsWithoutRef<'div'> {
interface HeadsUpNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'key'> {
onClose: () => void;
}

Expand Down
2 changes: 1 addition & 1 deletion components/installationCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CardOptionInfo } from '../../types';

import { Card, CardTitle, CardDescription } from './installationCard.styled';

export interface InstallationCardProps extends ComponentPropsWithoutRef<'div'> {
export interface InstallationCardProps extends Omit<ComponentPropsWithoutRef<'div'>, 'key'> {
active: boolean;
info: CardOptionInfo;
}
Expand Down
3 changes: 2 additions & 1 deletion components/numberInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { EXCLUSIVE_PLUM } from '../../constants/colors';

import { Root, NumInput, InputContainer, LabelContainer, Asterisk } from './numberInput.styled';

export interface NumberInputProps extends Omit<ComponentPropsWithoutRef<'label'>, 'onChange'> {
export interface NumberInputProps
extends Omit<ComponentPropsWithoutRef<'label'>, 'onChange' | 'key'> {
label?: string;
inputProps?: InputHTMLAttributes<HTMLInputElement>;
onChange?: (value: number) => void;
Expand Down
2 changes: 1 addition & 1 deletion components/select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const EnvironmentSelect: FunctionComponent<EnvironmentSelectProps> = ({
);
};

interface TagSelectProps extends SelectProps<TagColor> {
interface TagSelectProps extends Omit<SelectProps<TagColor>, 'key'> {
options: readonly string[];
helperText?: string;
error?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions components/select/select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Default: StoryObj<typeof SelectComponent> = {
};

export const TagSelect: StoryObj<typeof TagSelectWithRef> = {
render: (args) => <TagSelectWithRef {...args} />,
render: ({ key, ...args }) => <TagSelectWithRef {...args} />,
args: {
label: 'Cluster environments',
placeholder: 'Select',
Expand All @@ -41,7 +41,7 @@ export const TagSelect: StoryObj<typeof TagSelectWithRef> = {
};

export const EnvironmentSelect: StoryObj<typeof EnvironmentSelectWithRef> = {
render: (args) => <EnvironmentSelectWithRef {...args} />,
render: ({ key, ...args }) => <EnvironmentSelectWithRef {...args} />,
args: {
label: 'Environment cluster will host',
required: true,
Expand Down
4 changes: 2 additions & 2 deletions components/switch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Switch as SwitchMui, SwitchProps, styled } from '@mui/material';

import { PRIMARY } from '../../constants/colors';

const CustomSwitch = styled((props: SwitchProps) => (
const CustomSwitch = styled((props: Omit<SwitchProps, 'key'>) => (
<SwitchMui focusVisibleClassName=".Mui-focusVisible" disableRipple {...props} />
))(({ theme }) => ({
'width': 44,
Expand Down Expand Up @@ -51,7 +51,7 @@ const CustomSwitch = styled((props: SwitchProps) => (
},
}));

const Switch: FunctionComponent<SwitchProps> = (props) => {
const Switch: FunctionComponent<Omit<SwitchProps, 'key'>> = (props) => {
return <CustomSwitch {...props} />;
};

Expand Down
2 changes: 1 addition & 1 deletion components/typography/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ITypographyProps {
children: React.ReactNode;
}

const Typography: FunctionComponent<TypographyProps> = ({ variant, ...props }) => {
const Typography: FunctionComponent<Omit<TypographyProps, 'key'>> = ({ variant, ...props }) => {
return <TypographyMUI variant={variant as Variant} {...props} />;
};

Expand Down
4 changes: 3 additions & 1 deletion containers/clusterForms/clusterCreation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ import { InputContainer } from './advancedOptions/advancedOptions.styled';

const MIN_NODE_COUNT = 1;

const ClusterCreationForm: FunctionComponent<ComponentPropsWithoutRef<'div'>> = (props) => {
const ClusterCreationForm: FunctionComponent<Omit<ComponentPropsWithoutRef<'div'>, 'key'>> = (
props,
) => {
const { isOpen, openModal, closeModal } = useModal(false);

const [environments, setEnvironments] = useState<ClusterEnvironment[]>([
Expand Down
2 changes: 1 addition & 1 deletion containers/clusterManagement/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FunctionComponent, useCallback, useEffect, useState } from 'react';
import React, { FunctionComponent, useCallback, useEffect, useRef, useState } from 'react';
import { Box, Tabs } from '@mui/material';

import Button from '../../components/button';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"jackspeak": "2.1.1"
},
"volta": {
"node": "18.17.1",
"node": "18.18.0",
"yarn": "1.22.19"
}
}
Loading