From fbe11b5ec27f13b9e16c09acf6fdc8e6ecb84be0 Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Fri, 18 Nov 2022 15:12:09 +0100 Subject: [PATCH 1/2] init pass of forge-core usage Signed-off-by: David van der Spek --- www/src/components/Invite.tsx | 2 +- .../components/incidents/CreateIncident.tsx | 4 ++-- www/src/components/incidents/File.tsx | 4 ++-- www/src/components/incidents/Followers.tsx | 2 +- www/src/components/incidents/Incident.tsx | 3 ++- .../components/incidents/IncidentControls.tsx | 3 ++- .../components/incidents/IncidentStatus.tsx | 2 +- www/src/components/incidents/Incidents.tsx | 2 +- www/src/components/incidents/Markdown.tsx | 2 +- .../components/incidents/MessageControls.tsx | 12 ++++++------ www/src/components/incidents/MessageInput.tsx | 12 ++++++------ .../components/incidents/MessageReactions.tsx | 2 +- www/src/components/incidents/Notifications.tsx | 2 +- www/src/components/incidents/Severity.tsx | 2 +- www/src/components/incidents/Sidebar.tsx | 16 ++++++++-------- www/src/components/incidents/ViewSwitcher.tsx | 2 +- .../components/integrations/CreateWebhook.tsx | 3 ++- .../integrations/OAuthIntegrations.tsx | 2 +- .../components/integrations/OauthCreator.tsx | 2 +- www/src/components/integrations/Webhook.tsx | 18 +++++++++--------- www/src/components/integrations/WebhookLog.tsx | 12 ++++++------ www/src/components/oidc/OAuthConsent.tsx | 3 +-- www/src/components/payments/CreatePlan.tsx | 11 +++++------ .../components/payments/CreateSubscription.tsx | 4 ++-- www/src/components/payments/Plan.tsx | 14 +++++++------- www/src/components/payments/Subscription.tsx | 3 ++- www/src/components/payments/UpdatePlan.tsx | 2 +- www/src/components/payments/UpdatePlanForm.tsx | 3 ++- www/src/components/profile/Security.tsx | 2 +- www/src/components/repos/Artifacts.tsx | 2 +- www/src/components/repos/CreateRepository.tsx | 4 ++-- www/src/components/repos/EditInstallation.tsx | 4 ++-- www/src/components/repos/Integrations.tsx | 12 ++++++------ www/src/components/repos/Repositories.tsx | 12 ++++++------ www/src/components/repos/Tags.tsx | 2 +- www/src/components/users/BillingDetails.tsx | 9 +++++++-- www/src/components/utils/IconOld.tsx | 2 +- www/src/components/utils/SmoothScroller.tsx | 2 +- www/src/components/versions/VersionTags.tsx | 3 ++- 39 files changed, 106 insertions(+), 97 deletions(-) diff --git a/www/src/components/Invite.tsx b/www/src/components/Invite.tsx index a3d7130ff..663c2f65e 100644 --- a/www/src/components/Invite.tsx +++ b/www/src/components/Invite.tsx @@ -2,7 +2,7 @@ import { useState } from 'react' import { useParams } from 'react-router-dom' import { gql, useMutation, useQuery } from '@apollo/client' import { Box, Keyboard } from 'grommet' -import { GqlError } from 'forge-core' +// import { GqlError } from 'forge-core' import { AppIcon, Button } from '@pluralsh/design-system' import { Text } from 'honorable' diff --git a/www/src/components/incidents/CreateIncident.tsx b/www/src/components/incidents/CreateIncident.tsx index cf35ce85b..f2bd38d33 100644 --- a/www/src/components/incidents/CreateIncident.tsx +++ b/www/src/components/incidents/CreateIncident.tsx @@ -5,10 +5,10 @@ import { useState, } from 'react' import { Box, Text, TextInput } from 'grommet' -import { Button, SecondaryButton } from 'forge-core' +// import { SecondaryButton } from 'forge-core' import { Editable, Slate } from 'slate-react' import { useMutation, useQuery } from '@apollo/client' -import { CheckIcon } from '@pluralsh/design-system' +import { Button, CheckIcon } from '@pluralsh/design-system' import { useEditor } from '../utils/hooks' import { plainDeserialize, plainSerialize } from '../../utils/slate' diff --git a/www/src/components/incidents/File.tsx b/www/src/components/incidents/File.tsx index a21b4c574..118ee72de 100644 --- a/www/src/components/incidents/File.tsx +++ b/www/src/components/incidents/File.tsx @@ -1,10 +1,10 @@ import { useState } from 'react' import { Box, Stack, Text } from 'grommet' import { FileIcon, defaultStyles } from 'react-file-icon' -import { HoveredBackground, Tooltip } from 'forge-core' +// import { HoveredBackground } from 'forge-core' import moment from 'moment' import { filesize } from 'filesize' -import { DownloadIcon } from '@pluralsh/design-system' +import { DownloadIcon, Tooltip } from '@pluralsh/design-system' import { download } from '../../utils/file' diff --git a/www/src/components/incidents/Followers.tsx b/www/src/components/incidents/Followers.tsx index 62bed4b01..f822071aa 100644 --- a/www/src/components/incidents/Followers.tsx +++ b/www/src/components/incidents/Followers.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react' import { Box, Text } from 'grommet' -import { Scroller } from 'forge-core' +// import { Scroller } from 'forge-core' import { extendConnection } from '../../utils/graphql' import Avatar from '../users/Avatar' diff --git a/www/src/components/incidents/Incident.tsx b/www/src/components/incidents/Incident.tsx index b95de64d9..8ed39ba85 100644 --- a/www/src/components/incidents/Incident.tsx +++ b/www/src/components/incidents/Incident.tsx @@ -5,7 +5,7 @@ import { useMemo, useState, } from 'react' -import { Button, Scroller } from 'forge-core' +// import { Scroller } from 'forge-core' import { Editable, Slate } from 'slate-react' import { useMutation, useQuery, useSubscription } from '@apollo/client' import { useNavigate, useParams } from 'react-router-dom' @@ -17,6 +17,7 @@ import { } from 'grommet' import moment from 'moment' import { + Button, CloseIcon, FileIcon, MessagesIcon, diff --git a/www/src/components/incidents/IncidentControls.tsx b/www/src/components/incidents/IncidentControls.tsx index 59ed7ed09..6ab2261ce 100644 --- a/www/src/components/incidents/IncidentControls.tsx +++ b/www/src/components/incidents/IncidentControls.tsx @@ -5,8 +5,9 @@ import { Layer, Text, } from 'grommet' -import { Button, SecondaryButton } from 'forge-core' +// import { SecondaryButton } from 'forge-core' import { + Button, CameraIcon, CheckIcon, LightningIcon, diff --git a/www/src/components/incidents/IncidentStatus.tsx b/www/src/components/incidents/IncidentStatus.tsx index bf7b8b17b..97f88d156 100644 --- a/www/src/components/incidents/IncidentStatus.tsx +++ b/www/src/components/incidents/IncidentStatus.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react' import { Box, Text } from 'grommet' -import { Select } from 'forge-core' +import { Select } from '@pluralsh/design-system' import { ThemeContext } from 'styled-components' diff --git a/www/src/components/incidents/Incidents.tsx b/www/src/components/incidents/Incidents.tsx index 6b66dd562..6bfda226f 100644 --- a/www/src/components/incidents/Incidents.tsx +++ b/www/src/components/incidents/Incidents.tsx @@ -14,8 +14,8 @@ import { TextInput, ThemeContext, } from 'grommet' -import { Button } from 'forge-core' import { + Button, CaretRightIcon, CheckIcon, CloseIcon, diff --git a/www/src/components/incidents/Markdown.tsx b/www/src/components/incidents/Markdown.tsx index 46509baef..d884b0007 100644 --- a/www/src/components/incidents/Markdown.tsx +++ b/www/src/components/incidents/Markdown.tsx @@ -11,7 +11,7 @@ import { Markdown, Text, } from 'grommet' -import { TooltipContent } from 'forge-core' +// import { TooltipContent } from 'forge-core' import sortBy from 'lodash/sortBy' import { Emoji as Emojii } from 'emoji-mart' diff --git a/www/src/components/incidents/MessageControls.tsx b/www/src/components/incidents/MessageControls.tsx index 45c588161..86c39c821 100644 --- a/www/src/components/incidents/MessageControls.tsx +++ b/www/src/components/incidents/MessageControls.tsx @@ -5,12 +5,12 @@ import { useState, } from 'react' import { Box, Drop, Text } from 'grommet' -import { - Edit, - Emoji, - TooltipContent, - Trash, -} from 'forge-core' +// import { +// Edit, +// Emoji, +// TooltipContent, +// Trash, +// } from 'forge-core' import { useMutation } from '@apollo/client' import { useParams } from 'react-router-dom' diff --git a/www/src/components/incidents/MessageInput.tsx b/www/src/components/incidents/MessageInput.tsx index 7ded85bf4..ff827c207 100644 --- a/www/src/components/incidents/MessageInput.tsx +++ b/www/src/components/incidents/MessageInput.tsx @@ -19,12 +19,12 @@ import { MoonLoader, SyncLoader } from 'react-spinners' import { Progress } from 'react-sweet-progress' import { Editor as SlateEditor, Transforms } from 'slate' import { useParams } from 'react-router-dom' -import { - Attachment, - Close, - Emoji, - SendMessage, -} from 'forge-core' +// import { +// Attachment, +// Close, +// Emoji, +// SendMessage, +// } from 'forge-core' import { filesize as fs } from 'filesize' import { NimbleEmoji, emojiIndex } from 'emoji-mart' import { ThemeContext } from 'styled-components' diff --git a/www/src/components/incidents/MessageReactions.tsx b/www/src/components/incidents/MessageReactions.tsx index ed4e029e9..ff07bea28 100644 --- a/www/src/components/incidents/MessageReactions.tsx +++ b/www/src/components/incidents/MessageReactions.tsx @@ -2,7 +2,7 @@ import { useContext } from 'react' import { useMutation } from '@apollo/client' import { Box, Text } from 'grommet' -import { Tooltip } from 'forge-core' +import { Tooltip } from '@pluralsh/design-system' import 'emoji-mart/css/emoji-mart.css' import { Emoji } from 'emoji-mart' diff --git a/www/src/components/incidents/Notifications.tsx b/www/src/components/incidents/Notifications.tsx index 023963c32..39078933b 100644 --- a/www/src/components/incidents/Notifications.tsx +++ b/www/src/components/incidents/Notifications.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react' import { Box, Text } from 'grommet' -import { Scroller } from 'forge-core' +// import { Scroller } from 'forge-core' import { useApolloClient, useMutation, diff --git a/www/src/components/incidents/Severity.tsx b/www/src/components/incidents/Severity.tsx index d9c54a62e..295f73500 100644 --- a/www/src/components/incidents/Severity.tsx +++ b/www/src/components/incidents/Severity.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react' import { Box, Text } from 'grommet' -import { Select } from 'forge-core' +import { Select } from '@pluralsh/design-system' import { normalizeColor } from 'grommet/utils' diff --git a/www/src/components/incidents/Sidebar.tsx b/www/src/components/incidents/Sidebar.tsx index 128b21e02..c7ad519a4 100644 --- a/www/src/components/incidents/Sidebar.tsx +++ b/www/src/components/incidents/Sidebar.tsx @@ -1,13 +1,13 @@ import { useCallback, useState } from 'react' import { Box, Stack, Text } from 'grommet' -import { - Cluster, - Eye as Hide, - History, - Notification, - Package, - User, -} from 'forge-core' +// import { +// Cluster, +// Eye as Hide, +// History, +// Notification, +// Package, +// User, +// } from 'forge-core' import { IncidentHistory } from './IncidentHistory' import { SidebarView } from './types' diff --git a/www/src/components/incidents/ViewSwitcher.tsx b/www/src/components/incidents/ViewSwitcher.tsx index 3b194beb9..fe8df459b 100644 --- a/www/src/components/incidents/ViewSwitcher.tsx +++ b/www/src/components/incidents/ViewSwitcher.tsx @@ -1,7 +1,7 @@ import { createElement, useRef, useState } from 'react' import { Box, Text } from 'grommet' -import { Check as Checkmark, File, Messages } from 'forge-core' +// import { Check as Checkmark, File, Messages } from 'forge-core' import { Tooltip } from '../utils/Tooltip' diff --git a/www/src/components/integrations/CreateWebhook.tsx b/www/src/components/integrations/CreateWebhook.tsx index c9ecbcd78..b41b97455 100644 --- a/www/src/components/integrations/CreateWebhook.tsx +++ b/www/src/components/integrations/CreateWebhook.tsx @@ -1,6 +1,7 @@ import { useState } from 'react' import { useMutation } from '@apollo/client' -import { Button, SecondaryButton } from 'forge-core' +// import { SecondaryButton } from 'forge-core' +import { Button } from '@pluralsh/design-system' import { Box, FormField, diff --git a/www/src/components/integrations/OAuthIntegrations.tsx b/www/src/components/integrations/OAuthIntegrations.tsx index e9daaa0af..999e68b4d 100644 --- a/www/src/components/integrations/OAuthIntegrations.tsx +++ b/www/src/components/integrations/OAuthIntegrations.tsx @@ -1,6 +1,6 @@ import { useQuery } from '@apollo/client' import { Box, Text } from 'grommet' -import { Check as Checkmark } from 'forge-core' +// import { Check as Checkmark } from 'forge-core' import { ZOOM_ICON, ZOOM_INSTALL_URL } from './constants' import { OAUTH_Q } from './queries' diff --git a/www/src/components/integrations/OauthCreator.tsx b/www/src/components/integrations/OauthCreator.tsx index 6f5266f49..0eb31046b 100644 --- a/www/src/components/integrations/OauthCreator.tsx +++ b/www/src/components/integrations/OauthCreator.tsx @@ -1,5 +1,5 @@ import { useEffect, useMemo } from 'react' -import { Errors } from 'forge-core' +// import { Errors } from 'forge-core' import { useLocation, useNavigate, useParams } from 'react-router-dom' import { useMutation } from '@apollo/client' diff --git a/www/src/components/integrations/Webhook.tsx b/www/src/components/integrations/Webhook.tsx index 340a4d382..8010dbf86 100644 --- a/www/src/components/integrations/Webhook.tsx +++ b/www/src/components/integrations/Webhook.tsx @@ -1,14 +1,14 @@ import { useContext, useEffect, useState } from 'react' import { useNavigate, useParams } from 'react-router-dom' -import { - Button, - Close, - Copyable, - Edit, - Reload, - SecondaryButton, - Trash, -} from 'forge-core' +// import { +// Button, +// Close, +// Copyable, +// Edit, +// Reload, +// SecondaryButton, +// Trash, +// } from 'forge-core' import { Box, Layer, diff --git a/www/src/components/integrations/WebhookLog.tsx b/www/src/components/integrations/WebhookLog.tsx index d9b197427..022f80a5e 100644 --- a/www/src/components/integrations/WebhookLog.tsx +++ b/www/src/components/integrations/WebhookLog.tsx @@ -1,11 +1,11 @@ import { useState } from 'react' import { Box, Collapsible, Text } from 'grommet' -import { - TabContent, - TabHeader, - TabHeaderItem, - Tabs, -} from 'forge-core' +// import { +// TabContent, +// TabHeader, +// TabHeaderItem, +// Tabs, +// } from 'forge-core' import ReactJson from 'react-json-view' import moment from 'moment' diff --git a/www/src/components/oidc/OAuthConsent.tsx b/www/src/components/oidc/OAuthConsent.tsx index 288c436b7..ddddd048d 100644 --- a/www/src/components/oidc/OAuthConsent.tsx +++ b/www/src/components/oidc/OAuthConsent.tsx @@ -1,8 +1,7 @@ import { useLocation } from 'react-router-dom' import { useMutation, useQuery } from '@apollo/client' -import { Button } from 'forge-core' import queryString from 'query-string' -import { ArrowRightLeftIcon } from '@pluralsh/design-system' +import { ArrowRightLeftIcon, Button } from '@pluralsh/design-system' import { Box, Text } from 'grommet' import { LoginPortal } from '../users/MagicLogin' diff --git a/www/src/components/payments/CreatePlan.tsx b/www/src/components/payments/CreatePlan.tsx index 61c92bce4..3f2c51507 100644 --- a/www/src/components/payments/CreatePlan.tsx +++ b/www/src/components/payments/CreatePlan.tsx @@ -8,15 +8,14 @@ import { Text, TextInput, } from 'grommet' +// import { HoveredBackground, SecondaryButton, Trash } from 'forge-core' +import { FaDollarSign } from 'react-icons/fa' import { Button, - HoveredBackground, - SecondaryButton, + CreditCardIcon, + PlusIcon, Select, - Trash, -} from 'forge-core' -import { FaDollarSign } from 'react-icons/fa' -import { CreditCardIcon, PlusIcon } from '@pluralsh/design-system' +} from '@pluralsh/design-system' import { LabeledInput } from '../repos/CreateRepository' diff --git a/www/src/components/payments/CreateSubscription.tsx b/www/src/components/payments/CreateSubscription.tsx index 933b37322..f732c3829 100644 --- a/www/src/components/payments/CreateSubscription.tsx +++ b/www/src/components/payments/CreateSubscription.tsx @@ -1,7 +1,7 @@ import { useState } from 'react' import { Box, Layer, Text } from 'grommet' -import { Button, NumericInput } from 'forge-core' -import { PlusIcon } from '@pluralsh/design-system' +// import { NumericInput } from 'forge-core' +import { Button, PlusIcon } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' import { deepUpdate } from '../../utils/graphql' diff --git a/www/src/components/payments/Plan.tsx b/www/src/components/payments/Plan.tsx index b8c0c35f2..898897ede 100644 --- a/www/src/components/payments/Plan.tsx +++ b/www/src/components/payments/Plan.tsx @@ -2,13 +2,13 @@ import './plan.css' import { useCallback, useContext, useState } from 'react' import styled from 'styled-components' -import { - Check as Checkmark, - Edit, - Group, - HoveredBackground, - Reload as Refresh, -} from 'forge-core' +// import { +// Check as Checkmark, +// Edit, +// Group, +// HoveredBackground, +// Reload as Refresh, +// } from 'forge-core' import { Anchor, Box, diff --git a/www/src/components/payments/Subscription.tsx b/www/src/components/payments/Subscription.tsx index db041b5de..62249313b 100644 --- a/www/src/components/payments/Subscription.tsx +++ b/www/src/components/payments/Subscription.tsx @@ -5,7 +5,8 @@ import { Layer, Text, } from 'grommet' -import { Button, Reload as Refresh } from 'forge-core' +// import { Reload as Refresh } from 'forge-core' +import { Button } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' import { NumericInput } from '../utils/NumericInput' diff --git a/www/src/components/payments/UpdatePlan.tsx b/www/src/components/payments/UpdatePlan.tsx index 31b1ef225..2990c1946 100644 --- a/www/src/components/payments/UpdatePlan.tsx +++ b/www/src/components/payments/UpdatePlan.tsx @@ -1,6 +1,6 @@ import { Box, Layer, Text } from 'grommet' import { useMutation } from '@apollo/client' -import { Button } from 'forge-core' +import { Button } from '@pluralsh/design-system' import { ModalHeader } from '../ModalHeader' diff --git a/www/src/components/payments/UpdatePlanForm.tsx b/www/src/components/payments/UpdatePlanForm.tsx index c7429adec..20e0614af 100644 --- a/www/src/components/payments/UpdatePlanForm.tsx +++ b/www/src/components/payments/UpdatePlanForm.tsx @@ -1,5 +1,6 @@ import { useState } from 'react' -import { Button, SecondaryButton } from 'forge-core' +// import { SecondaryButton } from 'forge-core' +import { Button } from '@pluralsh/design-system' import { Box } from 'grommet' import { useMutation } from '@apollo/client' diff --git a/www/src/components/profile/Security.tsx b/www/src/components/profile/Security.tsx index 4b91d5fa7..9db6f2738 100644 --- a/www/src/components/profile/Security.tsx +++ b/www/src/components/profile/Security.tsx @@ -8,7 +8,7 @@ import { ValidatedInput, } from '@pluralsh/design-system' import { createElement, useContext, useState } from 'react' -import { Password } from 'forge-core' +// import { Password } from 'forge-core' import { METHOD_ICONS } from '../users/utils' diff --git a/www/src/components/repos/Artifacts.tsx b/www/src/components/repos/Artifacts.tsx index e61d61465..c41c65fdc 100644 --- a/www/src/components/repos/Artifacts.tsx +++ b/www/src/components/repos/Artifacts.tsx @@ -20,7 +20,7 @@ import { UbuntuLogoIcon, WindowsLogoIcon, } from '@pluralsh/design-system' -import { Copyable } from 'forge-core' +// import { Copyable } from 'forge-core' import { normalizeColor } from 'grommet/utils' import { filesize as fs } from 'filesize' import moment from 'moment' diff --git a/www/src/components/repos/CreateRepository.tsx b/www/src/components/repos/CreateRepository.tsx index dba2d535b..c0087c613 100644 --- a/www/src/components/repos/CreateRepository.tsx +++ b/www/src/components/repos/CreateRepository.tsx @@ -1,8 +1,8 @@ import { useCallback, useState } from 'react' import { Box, Text, TextInput } from 'grommet' -import { PlusIcon } from '@pluralsh/design-system' +import { Button, PlusIcon, Select } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' -import { Button, SecondaryButton, Select } from 'forge-core' +// import { SecondaryButton } from 'forge-core' import { FilePicker } from 'react-file-picker' import { useNavigate } from 'react-router-dom' diff --git a/www/src/components/repos/EditInstallation.tsx b/www/src/components/repos/EditInstallation.tsx index f3eac7f6d..5d7f18483 100644 --- a/www/src/components/repos/EditInstallation.tsx +++ b/www/src/components/repos/EditInstallation.tsx @@ -1,8 +1,8 @@ import { useState } from 'react' import { useMutation } from '@apollo/client' -import { Button, Pill, Select } from 'forge-core' +// import { Pill } from 'forge-core' import { Box, CheckBox, Text } from 'grommet' -import { CloseIcon } from '@pluralsh/design-system' +import { Button, CloseIcon, Select } from '@pluralsh/design-system' import Toggle from 'react-toggle' import { TAGS } from '../versions/VersionTags' diff --git a/www/src/components/repos/Integrations.tsx b/www/src/components/repos/Integrations.tsx index 1b5d7fc75..7a16dc076 100644 --- a/www/src/components/repos/Integrations.tsx +++ b/www/src/components/repos/Integrations.tsx @@ -2,12 +2,12 @@ import { useContext, useEffect, useState } from 'react' import { useQuery } from '@apollo/client' import styled from 'styled-components' import { useNavigate, useParams } from 'react-router-dom' -import { - Carousel, - HoveredBackground, - ScrollableContainer, - Scroller, -} from 'forge-core' +// import { +// Carousel, +// HoveredBackground, +// ScrollableContainer, +// Scroller, +// } from 'forge-core' import { Anchor, Box, diff --git a/www/src/components/repos/Repositories.tsx b/www/src/components/repos/Repositories.tsx index f2db8d0e2..03e1ca897 100644 --- a/www/src/components/repos/Repositories.tsx +++ b/www/src/components/repos/Repositories.tsx @@ -1,11 +1,11 @@ import { useContext } from 'react' import { Box, Text, ThemeContext } from 'grommet' -import { - HoveredBackground, - Password, - Scroller, - Trash, -} from 'forge-core' +// import { +// HoveredBackground, +// Password, +// Scroller, +// Trash, +// } from 'forge-core' import { useMutation, useQuery } from '@apollo/client' import { useNavigate } from 'react-router-dom' diff --git a/www/src/components/repos/Tags.tsx b/www/src/components/repos/Tags.tsx index b7a1f6169..ac537dc40 100644 --- a/www/src/components/repos/Tags.tsx +++ b/www/src/components/repos/Tags.tsx @@ -5,7 +5,7 @@ import { Text, TextInput, } from 'grommet' -import { Scroller, Tag as TagInner } from 'forge-core' +// import { Scroller, Tag as TagInner } from 'forge-core' import { extendConnection } from '../../utils/graphql' diff --git a/www/src/components/users/BillingDetails.tsx b/www/src/components/users/BillingDetails.tsx index 87a0c8ea9..9094f4222 100644 --- a/www/src/components/users/BillingDetails.tsx +++ b/www/src/components/users/BillingDetails.tsx @@ -5,8 +5,13 @@ import { useCallback, useContext, useState } from 'react' import { CardElement, Elements, injectStripe } from 'react-stripe-elements' import { Box, Layer, Text } from 'grommet' import { useMutation, useQuery } from '@apollo/client' -import { Button, PaymentMethods, Trash } from 'forge-core' -import { CreditCardIcon as Amex, CreditCardIcon as Mastercard, CreditCardIcon as Visa } from '@pluralsh/design-system' +// import { PaymentMethods, Trash } from 'forge-core' +import { + CreditCardIcon as Amex, + Button, + CreditCardIcon as Mastercard, + CreditCardIcon as Visa, +} from '@pluralsh/design-system' import { HeaderItem } from '../utils/Header' diff --git a/www/src/components/utils/IconOld.tsx b/www/src/components/utils/IconOld.tsx index 4122c0305..60e2205fb 100644 --- a/www/src/components/utils/IconOld.tsx +++ b/www/src/components/utils/IconOld.tsx @@ -1,6 +1,6 @@ import { createElement, useRef, useState } from 'react' import { Box, Text } from 'grommet' -import { TooltipContent } from 'forge-core' +// import { TooltipContent } from 'forge-core' export function Icon({ icon, iconAttrs, tooltip, onClick, hover, diff --git a/www/src/components/utils/SmoothScroller.tsx b/www/src/components/utils/SmoothScroller.tsx index 027397504..48bd2f9b2 100644 --- a/www/src/components/utils/SmoothScroller.tsx +++ b/www/src/components/utils/SmoothScroller.tsx @@ -5,7 +5,7 @@ import { VariableSizeList } from 'react-window-reversed' import { FixedSizeList as FixedList, VariableSizeList as List } from 'react-window' import Autosizer from 'react-virtualized-auto-sizer' import memoize from 'memoize-one' -import { CellMeasurer } from 'forge-core' +// import { CellMeasurer } from 'forge-core' class SmartLoader extends PureComponent { _listRef: any = null diff --git a/www/src/components/versions/VersionTags.tsx b/www/src/components/versions/VersionTags.tsx index f4997d568..2de80ceed 100644 --- a/www/src/components/versions/VersionTags.tsx +++ b/www/src/components/versions/VersionTags.tsx @@ -1,6 +1,7 @@ import { useCallback, useState } from 'react' import { Box, Select, Text } from 'grommet' -import { Button, SecondaryButton } from 'forge-core' +// import { SecondaryButton } from 'forge-core' +import { Button } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' import { ModalHeader } from '../ModalHeader' From b775b5b083275e33d2f5dc39cc94dcd612eb5e70 Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Mon, 21 Nov 2022 14:25:32 +0100 Subject: [PATCH 2/2] remove SecondaryButton references Signed-off-by: David van der Spek --- www/src/components/incidents/CreateIncident.tsx | 4 ++-- www/src/components/incidents/IncidentControls.tsx | 4 ++-- www/src/components/integrations/CreateWebhook.tsx | 4 ++-- www/src/components/integrations/Webhook.tsx | 4 ++-- www/src/components/payments/CreatePlan.tsx | 11 +++++++---- www/src/components/payments/UpdatePlanForm.tsx | 4 ++-- www/src/components/repos/CreateRepository.tsx | 4 ++-- www/src/components/versions/VersionTags.tsx | 4 ++-- 8 files changed, 21 insertions(+), 18 deletions(-) diff --git a/www/src/components/incidents/CreateIncident.tsx b/www/src/components/incidents/CreateIncident.tsx index f2bd38d33..3dab222ec 100644 --- a/www/src/components/incidents/CreateIncident.tsx +++ b/www/src/components/incidents/CreateIncident.tsx @@ -5,7 +5,6 @@ import { useState, } from 'react' import { Box, Text, TextInput } from 'grommet' -// import { SecondaryButton } from 'forge-core' import { Editable, Slate } from 'slate-react' import { useMutation, useQuery } from '@apollo/client' import { Button, CheckIcon } from '@pluralsh/design-system' @@ -221,7 +220,8 @@ export function CreateIncident({ onCompleted }: any) { justify="end" gap="small" > - diff --git a/www/src/components/incidents/IncidentControls.tsx b/www/src/components/incidents/IncidentControls.tsx index 6ab2261ce..187e3a295 100644 --- a/www/src/components/incidents/IncidentControls.tsx +++ b/www/src/components/incidents/IncidentControls.tsx @@ -5,7 +5,6 @@ import { Layer, Text, } from 'grommet' -// import { SecondaryButton } from 'forge-core' import { Button, CameraIcon, @@ -118,7 +117,8 @@ function CompleteIncident({ incident: { id } }: any) { align="center" gap="xsmall" > - setOpen(false)} /> diff --git a/www/src/components/integrations/CreateWebhook.tsx b/www/src/components/integrations/CreateWebhook.tsx index b41b97455..badc0b6d1 100644 --- a/www/src/components/integrations/CreateWebhook.tsx +++ b/www/src/components/integrations/CreateWebhook.tsx @@ -1,6 +1,5 @@ import { useState } from 'react' import { useMutation } from '@apollo/client' -// import { SecondaryButton } from 'forge-core' import { Button } from '@pluralsh/design-system' import { Box, @@ -122,7 +121,8 @@ export function CreateWebhook({ cancel }: any) { justify="end" gap="xsmall" > - diff --git a/www/src/components/integrations/Webhook.tsx b/www/src/components/integrations/Webhook.tsx index 8010dbf86..908098be8 100644 --- a/www/src/components/integrations/Webhook.tsx +++ b/www/src/components/integrations/Webhook.tsx @@ -6,7 +6,6 @@ import { useNavigate, useParams } from 'react-router-dom' // Copyable, // Edit, // Reload, -// SecondaryButton, // Trash, // } from 'forge-core' import { @@ -261,7 +260,8 @@ function WebhookControls({ webhook, setEdit }: any) { justify="end" gap="small" > - setOpen(false)} /> diff --git a/www/src/components/payments/CreatePlan.tsx b/www/src/components/payments/CreatePlan.tsx index 3f2c51507..5f5f57758 100644 --- a/www/src/components/payments/CreatePlan.tsx +++ b/www/src/components/payments/CreatePlan.tsx @@ -8,7 +8,7 @@ import { Text, TextInput, } from 'grommet' -// import { HoveredBackground, SecondaryButton, Trash } from 'forge-core' +// import { HoveredBackground, Trash } from 'forge-core' import { FaDollarSign } from 'react-icons/fa' import { Button, @@ -210,7 +210,8 @@ function FeatureCreator({ gap="small" margin={{ top: 'small' }} > - setState(addFeature())} @@ -337,7 +338,8 @@ function ItemCreator({ gap="small" margin={{ top: 'small' }} > - setState(addLineItem())} @@ -535,7 +537,8 @@ function NavigableSlaForm({ gap="small" margin={{ top: 'small' }} > - setState({ ...state, serviceLevels: [...state.serviceLevels, serviceLevel] })} diff --git a/www/src/components/payments/UpdatePlanForm.tsx b/www/src/components/payments/UpdatePlanForm.tsx index 20e0614af..685d9ba12 100644 --- a/www/src/components/payments/UpdatePlanForm.tsx +++ b/www/src/components/payments/UpdatePlanForm.tsx @@ -1,5 +1,4 @@ import { useState } from 'react' -// import { SecondaryButton } from 'forge-core' import { Button } from '@pluralsh/design-system' import { Box } from 'grommet' @@ -29,7 +28,8 @@ export function UpdatePlanForm({ plan: { id, serviceLevels } }: any) { gap="small" margin={{ top: 'small' }} > - setAttributes({ ...attributes, serviceLevels: [...attributes.serviceLevels, serviceLevel] })} diff --git a/www/src/components/repos/CreateRepository.tsx b/www/src/components/repos/CreateRepository.tsx index c0087c613..963d2dddd 100644 --- a/www/src/components/repos/CreateRepository.tsx +++ b/www/src/components/repos/CreateRepository.tsx @@ -2,7 +2,6 @@ import { useCallback, useState } from 'react' import { Box, Text, TextInput } from 'grommet' import { Button, PlusIcon, Select } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' -// import { SecondaryButton } from 'forge-core' import { FilePicker } from 'react-file-picker' import { useNavigate } from 'react-router-dom' @@ -71,7 +70,8 @@ function ImagePicker({ }} onChange={file => generatePreview(file, setImage)} > - diff --git a/www/src/components/versions/VersionTags.tsx b/www/src/components/versions/VersionTags.tsx index 2de80ceed..4c8e8a635 100644 --- a/www/src/components/versions/VersionTags.tsx +++ b/www/src/components/versions/VersionTags.tsx @@ -1,6 +1,5 @@ import { useCallback, useState } from 'react' import { Box, Select, Text } from 'grommet' -// import { SecondaryButton } from 'forge-core' import { Button } from '@pluralsh/design-system' import { useMutation } from '@apollo/client' @@ -79,7 +78,8 @@ export function EditTags({ version, setOpen, refetch }: any) { value={value} onChange={({ option }) => setValue(option)} /> - addTag(value)} />