From 33252a4ecb2fe119a0f99712e1fa04f66f6ca7e9 Mon Sep 17 00:00:00 2001 From: Bogdan Hanea Date: Tue, 23 Jan 2024 11:33:57 +0200 Subject: [PATCH] feat: slack migration (#996) --- README.md | 2 +- packages/web/src/AppRoot.tsx | 2 +- packages/web/src/components/atoms/Icon/Icon.tsx | 4 ++-- packages/web/src/components/atoms/Icon/icons.tsx | 15 +++++++++++---- packages/web/src/components/atoms/Icon/types.ts | 2 +- .../EmptyListContent/EmptyListContent.tsx | 6 +++--- .../pages/ErrorBoundary/ErrorBoundaryFallback.tsx | 6 +++--- packages/web/src/plugins/config/plugin.ts | 4 ++-- packages/web/src/plugins/sider-support/plugin.tsx | 6 +++--- packages/web/src/utils/externalLinks.ts | 2 +- 10 files changed, 28 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 473569991..b093ef3f3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Website | Documentation | Twitter | - Discord | + Slack | Blog

diff --git a/packages/web/src/AppRoot.tsx b/packages/web/src/AppRoot.tsx index 6484a0535..64fd06716 100644 --- a/packages/web/src/AppRoot.tsx +++ b/packages/web/src/AppRoot.tsx @@ -48,7 +48,7 @@ const AppRoot: React.FC = () => { () => [ ...basePlugins, ClusterStatusPlugin, - ConfigPlugin.configure({discordUrl: externalLinks.discord}), + ConfigPlugin.configure({slackUrl: externalLinks.slack}), RouterPlugin.configure({baseUrl: env.basename || ''}), PermissionsPlugin.configure({resolver: new BasePermissionsResolver()}), RtkResetOnApiChangePlugin, diff --git a/packages/web/src/components/atoms/Icon/Icon.tsx b/packages/web/src/components/atoms/Icon/Icon.tsx index 4453b23ac..bfed9f834 100644 --- a/packages/web/src/components/atoms/Icon/Icon.tsx +++ b/packages/web/src/components/atoms/Icon/Icon.tsx @@ -10,7 +10,7 @@ import {IconProps} from './types'; const { CogIcon, DocumentationIcon, - DiscordIcon, + SlackIcon, GitHubIcon, PassedStatusIcon, FailedStatusIcon, @@ -25,7 +25,7 @@ const { const iconsMap: Record = { cog: CogIcon, documentation: DocumentationIcon, - discord: DiscordIcon, + slack: SlackIcon, github: GitHubIcon, passed: PassedStatusIcon, failed: FailedStatusIcon, diff --git a/packages/web/src/components/atoms/Icon/icons.tsx b/packages/web/src/components/atoms/Icon/icons.tsx index 7553fab03..a0cb203eb 100644 --- a/packages/web/src/components/atoms/Icon/icons.tsx +++ b/packages/web/src/components/atoms/Icon/icons.tsx @@ -41,10 +41,17 @@ const GitHubIcon: React.FC = () => { ); }; -const DiscordIcon: React.FC = () => { +const SlackIcon: React.FC = () => { return ( - - + + + + + + + + + ); }; @@ -114,7 +121,7 @@ export default { CogIcon, DocumentationIcon, GitHubIcon, - DiscordIcon, + SlackIcon, FailedStatusIcon, PassedStatusIcon, RunningStatusIcon, diff --git a/packages/web/src/components/atoms/Icon/types.ts b/packages/web/src/components/atoms/Icon/types.ts index 9a706a6b1..721cf304d 100644 --- a/packages/web/src/components/atoms/Icon/types.ts +++ b/packages/web/src/components/atoms/Icon/types.ts @@ -4,7 +4,7 @@ export type IconProps = { name: | 'cog' | 'documentation' - | 'discord' + | 'slack' | 'github' | 'passed' | 'failed' diff --git a/packages/web/src/components/molecules/EmptyListContent/EmptyListContent.tsx b/packages/web/src/components/molecules/EmptyListContent/EmptyListContent.tsx index 068ff34a3..f7cb86597 100644 --- a/packages/web/src/components/molecules/EmptyListContent/EmptyListContent.tsx +++ b/packages/web/src/components/molecules/EmptyListContent/EmptyListContent.tsx @@ -46,7 +46,7 @@ const EmptyListContent: React.FC> = pro isReadOnly, } = props; - const discordUrl = useConfigPlugin.select(x => x.discordUrl); + const slackUrl = useConfigPlugin.select(x => x.slackUrl); const isActionAvailable = usePermission(actionTypeToPermission[actionType]); return ( @@ -66,9 +66,9 @@ const EmptyListContent: React.FC> = pro {children} - + Need help getting started? Want to talk to Testkube engineers?{' '} - Find us on Discord + Find us on Slack diff --git a/packages/web/src/components/pages/ErrorBoundary/ErrorBoundaryFallback.tsx b/packages/web/src/components/pages/ErrorBoundary/ErrorBoundaryFallback.tsx index 27bbcce99..576718c33 100644 --- a/packages/web/src/components/pages/ErrorBoundary/ErrorBoundaryFallback.tsx +++ b/packages/web/src/components/pages/ErrorBoundary/ErrorBoundaryFallback.tsx @@ -13,7 +13,7 @@ import Colors from '@styles/Colors'; import {StyledErrorContainer, StyledErrorDescription, StyledErrorImage} from './ErrorBoundary.styled'; const ErrorBoundaryFallback: React.FC = () => { - const discordUrl = useConfigPlugin.select(x => x.discordUrl); + const slackUrl = useConfigPlugin.select(x => x.slackUrl); const back = useDashboardNavigate('/'); return ( @@ -27,8 +27,8 @@ const ErrorBoundaryFallback: React.FC = () => { refreshing this page. - Feel free to reach out to us on Discord if the error continuous - to exist. + Feel free to reach out to us on Slack if the error continuous to + exist.