Skip to content

Commit

Permalink
feat: integration urls, ux (#4640)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Sep 8, 2023
1 parent feab6db commit c59b83b
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ export const ArchiveTable = ({
prepareRow,
setHiddenColumns,
toggleAllRowsSelected,
toggleRowSelected,
} = useTable(
{
columns: columns as any[], // TODO: fix after `react-table` v8 update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export const LastSeenTooltip = ({
unit: string,
suffix: string
) => {
const [, textColor] = getColor(unit);
return (
<Typography
fontWeight={'bold'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<Typography variant="body2" color="text.secondary">
In order to connect your application to Unleash you
will need a client SDK (software developer kit) for
your programming language and an API token.
your programming language and an{' '}
<a
href="https://docs.getunleash.io/how-to/how-to-create-api-tokens"
target="_blank"
rel="noopener noreferrer"
>
API token
</a>
</Typography>
</div>
<div>
Expand Down Expand Up @@ -160,9 +167,23 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
Client-side SDKs
</Typography>
<Typography variant="body2" color="text.secondary">
Client-side SDKs can connect to the Unleash Proxy or
to the Unleash front-end API, but not to the regular
Unleash client API.
Client-side SDKs can connect to the{' '}
<a
href="https://docs.getunleash.io/reference/unleash-edge"
target="_blank"
rel="noopener noreferrer"
>
Unleash Edge
</a>{' '}
or to the{' '}
<a
href="https://docs.getunleash.io/reference/front-end-api"
target="_blank"
rel="noopener noreferrer"
>
Unleash front-end API
</a>
, but not to the regular Unleash client API.
</Typography>
</div>
<StyledCardsGrid small>
Expand All @@ -189,8 +210,8 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<StyledSection>
<StyledGrayContainer>
<div>
<Typography component="h3" variant="h2">
Other
<Typography component="h3" variant="h4">
Community SDKs
</Typography>
<Typography>
<a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { Fragment, VFC } from 'react';
import { Link } from 'react-router-dom';
import { styled, Typography, Theme } from '@mui/material';
import { styled, Typography } from '@mui/material';
import { IntegrationIcon } from '../IntegrationIcon/IntegrationIcon';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import { Badge } from 'component/common/Badge/Badge';
import { IntegrationCardMenu } from './IntegrationCardMenu/IntegrationCardMenu';
import type { AddonSchema } from 'openapi';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';

interface IIntegrationCardProps {
id?: string | number;
Expand Down Expand Up @@ -70,6 +71,10 @@ const StyledAction = styled(Typography)(({ theme }) => ({
gap: theme.spacing(0.5),
}));

const StyledOpenInNewIcon = styled(OpenInNewIcon)(({ theme }) => ({
fontSize: theme.fontSizes.bodySize,
}));

export const IntegrationCard: VFC<IIntegrationCardProps> = ({
icon,
title,
Expand Down Expand Up @@ -109,7 +114,12 @@ export const IntegrationCard: VFC<IIntegrationCardProps> = ({
{description}
</Typography>
<StyledAction data-loading>
{configureActionText} <ChevronRightIcon />
{configureActionText}
<ConditionallyRender
condition={isExternal}
show={<StyledOpenInNewIcon />}
elseShow={<ChevronRightIcon />}
/>
</StyledAction>
</Fragment>
);
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/component/project/Project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
StyledTopRow,
} from './Project.styles';
import { Box, Paper, Tabs, Typography } from '@mui/material';
import { Delete, Edit, FileUpload } from '@mui/icons-material';
import { FileUpload } from '@mui/icons-material';
import useToast from 'hooks/useToast';
import useQueryParams from 'hooks/useQueryParams';
import { useEffect, useState } from 'react';
Expand All @@ -24,11 +24,7 @@ import { ProjectFeaturesArchive } from './ProjectFeaturesArchive/ProjectFeatures
import ProjectOverview from './ProjectOverview';
import ProjectHealth from './ProjectHealth/ProjectHealth';
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
import {
UPDATE_FEATURE,
DELETE_PROJECT,
UPDATE_PROJECT,
} from 'component/providers/AccessProvider/permissions';
import { UPDATE_FEATURE } from 'component/providers/AccessProvider/permissions';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, List, ListItem } from '@mui/material';
import { Box } from '@mui/material';
import { useProjectDoraMetrics } from 'hooks/api/getters/useProjectDoraMetrics/useProjectDoraMetrics';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import { useMemo } from 'react';
Expand Down Expand Up @@ -57,7 +57,7 @@ export const ProjectDoraMetrics = () => {
width: '50%',
Cell: ({
row: {
original: { name, description },
original: { name },
},
}: any) => {
return (
Expand Down Expand Up @@ -129,7 +129,6 @@ export const ProjectDoraMetrics = () => {
rows,
prepareRow,
state: { globalFilter },
setGlobalFilter,
} = useTable(
{
columns: columns as any[], // TODO: fix after `react-table` v8 update
Expand Down

0 comments on commit c59b83b

Please sign in to comment.