diff --git a/packages/manager/.changeset/pr-10524-tech-stories-1716999765184.md b/packages/manager/.changeset/pr-10524-tech-stories-1716999765184.md new file mode 100644 index 00000000000..2e6b8ba7975 --- /dev/null +++ b/packages/manager/.changeset/pr-10524-tech-stories-1716999765184.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +Clean up loading components ([#10524](https://github.com/linode/manager/pull/10524)) diff --git a/packages/manager/src/components/Autocomplete/Autocomplete.tsx b/packages/manager/src/components/Autocomplete/Autocomplete.tsx index cc9a4100c73..90a7202f4d5 100644 --- a/packages/manager/src/components/Autocomplete/Autocomplete.tsx +++ b/packages/manager/src/components/Autocomplete/Autocomplete.tsx @@ -120,7 +120,7 @@ export const Autocomplete = < <> {loading && ( - + )} {textFieldProps?.InputProps?.endAdornment} diff --git a/packages/manager/src/components/CircleProgress/CircleProgress.test.tsx b/packages/manager/src/components/CircleProgress/CircleProgress.test.tsx index b9416f0f1e6..989113ef285 100644 --- a/packages/manager/src/components/CircleProgress/CircleProgress.test.tsx +++ b/packages/manager/src/components/CircleProgress/CircleProgress.test.tsx @@ -15,40 +15,21 @@ describe('CircleProgress', () => { const circle = screen.getByTestId('circle-progress'); expect(circle).toBeInTheDocument(); expect(circle).toHaveStyle('width: 124px; height: 124px;'); - const innerCircle = screen.getByTestId('inner-circle-progress'); - expect(innerCircle).toBeInTheDocument(); }); - it('renders a mini CircleProgress', () => { - const screen = renderWithTheme(); + it('renders a small CircleProgress', () => { + const screen = renderWithTheme(); const circleProgress = screen.getByLabelText(CONTENT_LOADING); expect(circleProgress).toBeVisible(); expect(circleProgress).toHaveStyle('width: 40px; height: 40px;'); }); - it('sets a mini CircleProgress with no padding', () => { - const screen = renderWithTheme(); + it('sets a small CircleProgress with no padding', () => { + const screen = renderWithTheme(); const circleProgress = screen.getByLabelText(CONTENT_LOADING); expect(circleProgress).toBeVisible(); - expect(circleProgress).toHaveStyle('width: 22px; height: 22px;'); - }); - - it('sets a mini CircleProgress with a custom size', () => { - const screen = renderWithTheme(); - - const circleProgress = screen.getByLabelText(CONTENT_LOADING); - expect(circleProgress).toBeVisible(); - expect(circleProgress).toHaveStyle('width: 25px; height: 25px;'); - }); - - it('renders a CircleProgress without the inner circle', () => { - const screen = renderWithTheme(); - - const circleProgress = screen.getByLabelText(CONTENT_LOADING); - expect(circleProgress).toBeVisible(); - const innerCircle = screen.queryByTestId('inner-circle-progress'); - expect(innerCircle).not.toBeInTheDocument(); + expect(circleProgress).toHaveStyle('width: 20px; height: 20px;'); }); }); diff --git a/packages/manager/src/components/CircleProgress/CircleProgress.tsx b/packages/manager/src/components/CircleProgress/CircleProgress.tsx index 24fe6e240fb..115f41c5422 100644 --- a/packages/manager/src/components/CircleProgress/CircleProgress.tsx +++ b/packages/manager/src/components/CircleProgress/CircleProgress.tsx @@ -1,58 +1,63 @@ +import _CircularProgress from '@mui/material/CircularProgress'; import { SxProps, styled } from '@mui/material/styles'; import * as React from 'react'; import { Box } from 'src/components/Box'; -import { - CircularProgress, - CircularProgressProps, -} from 'src/components/CircularProgress'; import { omittedProps } from 'src/utilities/omittedProps'; -interface CircleProgressProps extends CircularProgressProps { +import type { CircularProgressProps } from '@mui/material/CircularProgress'; + +interface CircleProgressProps extends Omit { /** * Additional child elements to pass in */ children?: JSX.Element; /** - * Displays a smaller version of the circle progress. - */ - mini?: boolean; - /** - * If true, will not show an inner circle beneath the spinning circle - */ - noInner?: boolean; - /** - * Removes the padding for `mini` circle progresses only. + * Removes the padding */ noPadding?: boolean; /** - * To be primarily used with mini and noPadding. Set spinner to a custom size. + * Sets the size of the spinner + * @default "lg" */ - size?: number; + size?: 'lg' | 'md' | 'sm' | 'xs'; /** * Additional styles to apply to the root element. */ sx?: SxProps; } +const SIZE_MAP = { + lg: 124, + md: 40, + sm: 20, + xs: 14, +}; + /** - * Use for short, indeterminate activities requiring user attention. + * Use for short, indeterminate activities requiring user attention. Defaults to large. + * + * sizes: + * xs = 14 + * md = 20 + * md = 40 + * lg = 124 */ const CircleProgress = (props: CircleProgressProps) => { - const { children, mini, noInner, noPadding, size, sx, ...rest } = props; + const { children, noPadding, size, sx, ...rest } = props; const variant = typeof props.value === 'number' ? 'determinate' : 'indeterminate'; const value = typeof props.value === 'number' ? props.value : 0; - if (mini) { + if (size) { return ( - ); @@ -63,16 +68,11 @@ const CircleProgress = (props: CircleProgressProps) => { {children !== undefined && ( {children} )} - {noInner !== true && ( - - - - )} ({ width: '100%', })); -const StyledTopWrapperDiv = styled('div')(({}) => ({ - alignItems: 'center', - display: 'flex', - height: '100%', - justifyContent: 'center', - position: 'absolute', - width: '100%', -})); - -const StyledTopDiv = styled('div')(({ theme }) => ({ - border: '1px solid #999', - borderRadius: '50%', - height: 70, - [theme.breakpoints.up('sm')]: { - height: 120, - width: 120, +const StyledCircularProgress = styled(_CircularProgress)(({ theme }) => ({ + position: 'relative', + [theme.breakpoints.down('sm')]: { + height: '72px !important', + width: '72px !important', }, - width: 70, })); -const StyledCircularProgress = styled(CircularProgress)( - ({ theme }) => ({ - position: 'relative', - [theme.breakpoints.down('sm')]: { - height: '72px !important', - width: '72px !important', - }, - }) -); - -const StyledMiniCircularProgress = styled(CircularProgress, { +const StyledCustomCircularProgress = styled(_CircularProgress, { shouldForwardProp: omittedProps(['noPadding']), -})(({ theme, ...props }) => ({ +})<{ noPadding: boolean | undefined }>(({ theme, ...props }) => ({ padding: `calc(${theme.spacing()} * 1.3)`, ...(props.noPadding && { padding: 0, diff --git a/packages/manager/src/components/CircularProgress.stories.tsx b/packages/manager/src/components/CircularProgress.stories.tsx deleted file mode 100644 index db6c4271610..00000000000 --- a/packages/manager/src/components/CircularProgress.stories.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Meta, StoryObj } from '@storybook/react'; -import React from 'react'; - -import { CircularProgress } from './CircularProgress'; - -const meta: Meta = { - component: CircularProgress, - title: 'Components/Loading States/Circular Progress', -}; - -type Story = StoryObj; - -export const Default: Story = { - render: (args) => , -}; - -export default meta; diff --git a/packages/manager/src/components/CircularProgress.tsx b/packages/manager/src/components/CircularProgress.tsx deleted file mode 100644 index 95ab3dd9391..00000000000 --- a/packages/manager/src/components/CircularProgress.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import _CircularProgress from '@mui/material/CircularProgress'; -import React from 'react'; - -import type { CircularProgressProps } from '@mui/material/CircularProgress'; - -/** - * Not to be confused with ``. - * @todo Consolidate these two components - */ -export const CircularProgress = (props: CircularProgressProps) => { - return <_CircularProgress {...props} />; -}; - -export type { CircularProgressProps }; diff --git a/packages/manager/src/components/DebouncedSearchTextField/DebouncedSearchTextField.tsx b/packages/manager/src/components/DebouncedSearchTextField/DebouncedSearchTextField.tsx index 0c215e5cf97..cb5c23eafc7 100644 --- a/packages/manager/src/components/DebouncedSearchTextField/DebouncedSearchTextField.tsx +++ b/packages/manager/src/components/DebouncedSearchTextField/DebouncedSearchTextField.tsx @@ -82,7 +82,7 @@ export const DebouncedSearchTextField = React.memo( InputProps={{ endAdornment: isSearching ? ( - + ) : ( clearable && diff --git a/packages/manager/src/components/EnhancedSelect/components/LoadingIndicator.tsx b/packages/manager/src/components/EnhancedSelect/components/LoadingIndicator.tsx index 14a1283fdf7..88cbadaeeb3 100644 --- a/packages/manager/src/components/EnhancedSelect/components/LoadingIndicator.tsx +++ b/packages/manager/src/components/EnhancedSelect/components/LoadingIndicator.tsx @@ -1,13 +1,13 @@ import { styled } from '@mui/material/styles'; import * as React from 'react'; -import { CircularProgress } from 'src/components/CircularProgress'; +import { CircleProgress } from 'src/components/CircleProgress'; export const LoadingIndicator = () => { - return ; + return ; }; -const StyledCircularProgress = styled(CircularProgress)(() => ({ +const StyledCircleProgress = styled(CircleProgress)(() => ({ position: 'relative', right: 20, })); diff --git a/packages/manager/src/components/LandingLoading/LandingLoading.stories.tsx b/packages/manager/src/components/LandingLoading/LandingLoading.stories.tsx deleted file mode 100644 index a57b9a11097..00000000000 --- a/packages/manager/src/components/LandingLoading/LandingLoading.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; - -import { DEFAULT_DELAY, LandingLoading } from './LandingLoading'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - argTypes: {}, - args: { - children: undefined, - delayInMS: DEFAULT_DELAY, - shouldDelay: false, - }, - component: LandingLoading, - title: 'Components/Loading States/LandingLoading', -}; - -export default meta; - -type Story = StoryObj; - -export const Default: Story = { - args: {}, - render: (args) => , -}; diff --git a/packages/manager/src/components/LandingLoading/LandingLoading.test.tsx b/packages/manager/src/components/LandingLoading/LandingLoading.test.tsx deleted file mode 100644 index ac5944a63a3..00000000000 --- a/packages/manager/src/components/LandingLoading/LandingLoading.test.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { act, render, screen } from '@testing-library/react'; -import * as React from 'react'; - -import { DEFAULT_DELAY, LandingLoading } from './LandingLoading'; - -vi.useFakeTimers(); - -const LOADING_ICON = 'circle-progress'; - -describe('LandingLoading', () => { - afterEach(() => { - vi.clearAllTimers(); - }); - - it('renders the loading indicator by default', () => { - render(); - expect(screen.getByTestId(LOADING_ICON)).toBeInTheDocument(); - }); - - it('renders custom loading indicator when children are provided', () => { - render( - -
Loading...
-
- ); - expect(screen.getByTestId('custom-loading-indicator')).toBeInTheDocument(); - expect(screen.queryByTestId(LOADING_ICON)).toBeNull(); - }); - - it('does not render the loading indicator when shouldDelay is true', () => { - render(); - expect(screen.queryByTestId(LOADING_ICON)).toBeNull(); - }); - - it('renders the loading indicator after the delay', () => { - render(); - expect(screen.queryByTestId(LOADING_ICON)).toBeNull(); - act(() => { - vi.advanceTimersByTime(DEFAULT_DELAY); - }); - expect(screen.getByTestId(LOADING_ICON)).toBeInTheDocument(); - }); - - it('renders the loading indicator after the specified delayInMS', () => { - render(); - expect(screen.queryByTestId(LOADING_ICON)).toBeNull(); - act(() => { - vi.advanceTimersByTime(2000); - }); - expect(screen.getByTestId(LOADING_ICON)).toBeInTheDocument(); - }); - - it('does not render the loading indicator when shouldDelay is false and no delayInMS is provided', () => { - render(); - expect(screen.getByTestId(LOADING_ICON)).toBeInTheDocument(); - }); -}); diff --git a/packages/manager/src/components/LandingLoading/LandingLoading.tsx b/packages/manager/src/components/LandingLoading/LandingLoading.tsx deleted file mode 100644 index 520b04fd21f..00000000000 --- a/packages/manager/src/components/LandingLoading/LandingLoading.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import * as React from 'react'; - -import { CircleProgress } from 'src/components/CircleProgress'; - -export const DEFAULT_DELAY = 1000; - -interface LandingLoadingProps { - /** Allow children to be passed in to override the default loading indicator */ - children?: JSX.Element; - /** If given, the loading indicator will not be rendered for the given duration in milliseconds */ - delayInMS?: number; - /** If true, the loading indicator will not be rendered for 1 second which may give user's with fast connections a more fluid experience. */ - shouldDelay?: boolean; -} - -export const LandingLoading = ({ - children, - delayInMS, - shouldDelay, -}: LandingLoadingProps): JSX.Element | null => { - const [showLoading, setShowLoading] = React.useState(false); - - React.useEffect(() => { - /* This `didCancel` business is to prevent a warning from React. - * See: https://github.com/facebook/react/issues/14369#issuecomment-468267798 - */ - let didCancel = false; - // Reference to the timeoutId so we can cancel it - let timeoutId: NodeJS.Timeout | null = null; - - if (shouldDelay || typeof delayInMS === 'number') { - // Used specified duration or default - const delayDuration = - typeof delayInMS === 'number' ? delayInMS : DEFAULT_DELAY; - - timeoutId = setTimeout(() => { - if (!didCancel) { - setShowLoading(true); - } - }, delayDuration); - } else { - setShowLoading(true); - } - return () => { - didCancel = true; - if (timeoutId) { - clearTimeout(timeoutId); - } - }; - }, [shouldDelay, delayInMS]); - - return showLoading - ? children || - : null; -}; diff --git a/packages/manager/src/components/LinkButton.tsx b/packages/manager/src/components/LinkButton.tsx index 55d118bbc42..4d4c21c25f9 100644 --- a/packages/manager/src/components/LinkButton.tsx +++ b/packages/manager/src/components/LinkButton.tsx @@ -1,10 +1,11 @@ import { Theme } from '@mui/material/styles'; -import { makeStyles } from 'tss-react/mui'; import * as React from 'react'; +import { makeStyles } from 'tss-react/mui'; + +import { CircleProgress } from 'src/components/CircleProgress'; import { Box } from './Box'; import { StyledLinkButton } from './Button/StyledLinkButton'; -import { CircularProgress } from './CircularProgress'; const useStyles = makeStyles()((theme: Theme) => ({ disabled: { @@ -12,9 +13,6 @@ const useStyles = makeStyles()((theme: Theme) => ({ cursor: 'default', pointerEvents: 'none', }, - spinner: { - marginLeft: theme.spacing(), - }, })); interface Props { @@ -58,7 +56,9 @@ export const LinkButton = (props: Props) => { return ( {Button} - + + + ); } diff --git a/packages/manager/src/components/MenuItem/MenuItem.tsx b/packages/manager/src/components/MenuItem/MenuItem.tsx index 2473835f403..3d153a1fda0 100644 --- a/packages/manager/src/components/MenuItem/MenuItem.tsx +++ b/packages/manager/src/components/MenuItem/MenuItem.tsx @@ -3,7 +3,6 @@ import { Theme } from '@mui/material/styles'; import * as React from 'react'; import { makeStyles } from 'tss-react/mui'; -import { CircularProgress } from 'src/components/CircularProgress'; import { IconButton } from 'src/components/IconButton'; import { MenuItem, MenuItemProps } from 'src/components/MenuItem'; @@ -88,9 +87,6 @@ export const WrapperMenuItem = (props: WrapperMenuItemCombinedProps) => { {...rest} className={`${classes.root} ${className} ${tooltip && 'hasTooltip'}`} > - {isLoading && ( - - )} {props.children} diff --git a/packages/manager/src/components/TableSortCell/TableSortCell.tsx b/packages/manager/src/components/TableSortCell/TableSortCell.tsx index fd7d860288b..8cd56dd0452 100644 --- a/packages/manager/src/components/TableSortCell/TableSortCell.tsx +++ b/packages/manager/src/components/TableSortCell/TableSortCell.tsx @@ -98,7 +98,7 @@ export const TableSortCell = (props: TableSortCellProps) => { {children} {!active && } - {isLoading && } + {isLoading && } ); }; diff --git a/packages/manager/src/components/TagCell/TagCell.tsx b/packages/manager/src/components/TagCell/TagCell.tsx index a79ea11bd84..7340707d0a9 100644 --- a/packages/manager/src/components/TagCell/TagCell.tsx +++ b/packages/manager/src/components/TagCell/TagCell.tsx @@ -132,7 +132,7 @@ export const TagCell = (props: TagCellProps) => { > {loading ? ( - + ) : null} {tags.map((thisTag) => ( diff --git a/packages/manager/src/components/TextField.tsx b/packages/manager/src/components/TextField.tsx index 15a71b066d7..cdf0a429d6a 100644 --- a/packages/manager/src/components/TextField.tsx +++ b/packages/manager/src/components/TextField.tsx @@ -427,7 +427,7 @@ export const TextField = (props: TextFieldProps) => { disableUnderline: true, endAdornment: loading && ( - + ), ...InputProps, diff --git a/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx b/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx index e05c8ce2448..971ec80d6b7 100644 --- a/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx +++ b/packages/manager/src/components/TransferDisplay/TransferDisplay.tsx @@ -43,7 +43,7 @@ export const TransferDisplay = React.memo(({ spacingTop }: Props) => { {isLoading ? ( <> Loading transfer data... - + ) : ( <> diff --git a/packages/manager/src/features/Account/SwitchAccounts/ChildAccountList.tsx b/packages/manager/src/features/Account/SwitchAccounts/ChildAccountList.tsx index 7803c0c7573..0e2242a2c18 100644 --- a/packages/manager/src/features/Account/SwitchAccounts/ChildAccountList.tsx +++ b/packages/manager/src/features/Account/SwitchAccounts/ChildAccountList.tsx @@ -77,7 +77,7 @@ export const ChildAccountList = React.memo( ) { return ( - + ); } @@ -144,7 +144,7 @@ export const ChildAccountList = React.memo( {!isSwitchingChildAccounts && !isLoading && renderChildAccounts} {hasNextPage && fetchNextPage()} />} - {isFetchingNextPage && } + {isFetchingNextPage && } ); } diff --git a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/GooglePayButton.tsx b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/GooglePayButton.tsx index 99835eefb88..f9fdb454989 100644 --- a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/GooglePayButton.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/GooglePayButton.tsx @@ -145,7 +145,7 @@ export const GooglePayButton = (props: Props) => { container justifyContent="center" > - + ); } diff --git a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PayPalButton.tsx b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PayPalButton.tsx index 6da3a6056d7..94b614ffe95 100644 --- a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PayPalButton.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PayPalButton.tsx @@ -222,7 +222,7 @@ export const PayPalButton = (props: Props) => { container justifyContent="center" > - + ); } diff --git a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/GooglePayChip.tsx b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/GooglePayChip.tsx index 2cc8901c1db..b79ac9dadf7 100644 --- a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/GooglePayChip.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/GooglePayChip.tsx @@ -102,7 +102,7 @@ export const GooglePayChip = (props: Props) => { if (isLoading) { return ( - + ); } diff --git a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PayPalChip.tsx b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PayPalChip.tsx index 7c76f26d092..b96626489e5 100644 --- a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PayPalChip.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PayPalChip.tsx @@ -161,7 +161,7 @@ export const PayPalChip = (props: Props) => { if (isLoading || isPending || !options['data-client-token']) { return ( - + ); } diff --git a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PaymentMethods.tsx b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PaymentMethods.tsx index fb16f7e602e..056fc1c7e61 100644 --- a/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PaymentMethods.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/PaymentInfoPanel/PaymentMethods.tsx @@ -33,7 +33,7 @@ const PaymentMethods = ({ justifyContent: 'center', }} > - + ); } diff --git a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx index 17d32930f5e..a313fe32b60 100644 --- a/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx +++ b/packages/manager/src/features/Databases/DatabaseDetail/DatabaseSummary/DatabaseSummaryConnectionDetails.tsx @@ -244,7 +244,7 @@ export const DatabaseSummaryConnectionDetails = (props: Props) => { {showCredentials && credentialsLoading ? (
- +
) : credentialsError ? ( <> diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Backups/BackupSelect.tsx b/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Backups/BackupSelect.tsx index e00f06e22df..11e1ee972cf 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Backups/BackupSelect.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Backups/BackupSelect.tsx @@ -3,8 +3,8 @@ import React from 'react'; import { useController, useWatch } from 'react-hook-form'; import { Box } from 'src/components/Box'; -import { CircularProgress } from 'src/components/CircularProgress'; import { DateTimeDisplay } from 'src/components/DateTimeDisplay'; +import { LinearProgress } from 'src/components/LinearProgress'; import { Notice } from 'src/components/Notice/Notice'; import { Paper } from 'src/components/Paper'; import { SelectionCard } from 'src/components/SelectionCard/SelectionCard'; @@ -38,11 +38,7 @@ export const BackupSelect = () => { } if (isFetching) { - return ( - - - - ); + return ; } if (hasNoBackups) { diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Marketplace/AppsList.tsx b/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Marketplace/AppsList.tsx index 59dfc3b7a07..839e13bc267 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Marketplace/AppsList.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/Tabs/Marketplace/AppsList.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { useController, useFormContext } from 'react-hook-form'; import { Box } from 'src/components/Box'; -import { CircularProgress } from 'src/components/CircularProgress'; +import { CircleProgress } from 'src/components/CircleProgress'; import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Stack } from 'src/components/Stack'; import { oneClickApps } from 'src/features/OneClickApps/oneClickAppsv2'; @@ -53,7 +53,7 @@ export const AppsList = ({ onOpenDetailsDrawer }: Props) => { justifyContent="center" width="100%" > - + ); } diff --git a/packages/manager/src/features/Linodes/LinodesCreate/SelectAppPanel.tsx b/packages/manager/src/features/Linodes/LinodesCreate/SelectAppPanel.tsx index ada6d0d36b7..4c9241c1ed9 100644 --- a/packages/manager/src/features/Linodes/LinodesCreate/SelectAppPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesCreate/SelectAppPanel.tsx @@ -1,8 +1,8 @@ import { Theme, styled } from '@mui/material/styles'; import * as React from 'react'; +import { CircleProgress } from 'src/components/CircleProgress'; import { ErrorState } from 'src/components/ErrorState/ErrorState'; -import { LandingLoading } from 'src/components/LandingLoading/LandingLoading'; import { Notice } from 'src/components/Notice/Notice'; import { Paper } from 'src/components/Paper'; import { AppPanelSection } from 'src/features/Linodes/LinodesCreate/AppPanelSection'; @@ -74,7 +74,7 @@ class SelectAppPanel extends React.PureComponent { return ( - + ); diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/IPTransfer.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/IPTransfer.tsx index cea0386e54e..872c66cb5be 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/IPTransfer.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/IPTransfer.tsx @@ -503,7 +503,7 @@ export const IPTransfer = (props: Props) => { ) : null} {(isLoading || ipv6RangesLoading) && searchText === '' ? (
- +
) : ( <> diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeIPAddressRow.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeIPAddressRow.tsx index 9f517a993b5..903580bcbb9 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeIPAddressRow.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/LinodeIPAddressRow.tsx @@ -151,7 +151,7 @@ const RangeRDNSCell = (props: { const ipsWithRDNS = listIPv6InRange(range.range, range.prefix, ipsInRegion); if (ipv6Loading) { - return ; + return ; } // We don't show anything if there are no addresses. diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferContent.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferContent.tsx index 9a6cc88ef49..c0b65afd2e6 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferContent.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferContent.tsx @@ -75,7 +75,7 @@ export const TransferContent = (props: ContentProps) => { return ( - + ); diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx index 3fbbb76e73e..a37c972bc48 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx @@ -119,7 +119,7 @@ export const TransferHistory = React.memo((props: Props) => { if (statsLoading) { return ( - + ); } diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx index e1a22966b17..e7eafa6cad4 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/LinodeWatchdogPanel.tsx @@ -1,8 +1,9 @@ -import { Box, CircularProgress, Stack } from '@mui/material'; +import { Box, Stack } from '@mui/material'; import Grid from '@mui/material/Unstable_Grid2'; import * as React from 'react'; import { Accordion } from 'src/components/Accordion'; +import { CircleProgress } from 'src/components/CircleProgress'; import { FormControlLabel } from 'src/components/FormControlLabel'; import { Notice } from 'src/components/Notice/Notice'; import { Toggle } from 'src/components/Toggle/Toggle'; @@ -58,7 +59,7 @@ export const LinodeWatchdogPanel = (props: Props) => { label={ {linode?.watchdog_enabled ? 'Enabled' : 'Disabled'} - {isLoading && } + {isLoading && } } disabled={isReadOnly} diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSummary/StatsPanel.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSummary/StatsPanel.tsx index 0c3b9b3b82b..d6a3576cb9b 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeSummary/StatsPanel.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeSummary/StatsPanel.tsx @@ -21,14 +21,14 @@ export const StatsPanel = (props: Props) => { {loading ? (
- +
) : ( renderBody() diff --git a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerConfigurations.tsx b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerConfigurations.tsx index 06db352e302..5c8923bb7bf 100644 --- a/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerConfigurations.tsx +++ b/packages/manager/src/features/LoadBalancers/LoadBalancerDetail/LoadBalancerConfigurations.tsx @@ -52,7 +52,7 @@ export const LoadBalancerConfigurations = () => { ))} {hasNextPage && fetchNextPage()} />} - {isFetchingNextPage && } + {isFetchingNextPage && }