1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

feat: integration urls, ux (#4640)

This commit is contained in:
Jaanus Sellin 2023-09-08 10:21:11 +03:00 committed by GitHub
parent feab6db76e
commit c59b83b07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 19 deletions

View File

@ -244,7 +244,6 @@ export const ArchiveTable = ({
prepareRow, prepareRow,
setHiddenColumns, setHiddenColumns,
toggleAllRowsSelected, toggleAllRowsSelected,
toggleRowSelected,
} = useTable( } = useTable(
{ {
columns: columns as any[], // TODO: fix after `react-table` v8 update columns: columns as any[], // TODO: fix after `react-table` v8 update

View File

@ -142,7 +142,6 @@ export const LastSeenTooltip = ({
unit: string, unit: string,
suffix: string suffix: string
) => { ) => {
const [, textColor] = getColor(unit);
return ( return (
<Typography <Typography
fontWeight={'bold'} fontWeight={'bold'}

View File

@ -123,7 +123,14 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<Typography variant="body2" color="text.secondary"> <Typography variant="body2" color="text.secondary">
In order to connect your application to Unleash you In order to connect your application to Unleash you
will need a client SDK (software developer kit) for 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> </Typography>
</div> </div>
<div> <div>
@ -160,9 +167,23 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
Client-side SDKs Client-side SDKs
</Typography> </Typography>
<Typography variant="body2" color="text.secondary"> <Typography variant="body2" color="text.secondary">
Client-side SDKs can connect to the Unleash Proxy or Client-side SDKs can connect to the{' '}
to the Unleash front-end API, but not to the regular <a
Unleash client API. 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> </Typography>
</div> </div>
<StyledCardsGrid small> <StyledCardsGrid small>
@ -189,8 +210,8 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
<StyledSection> <StyledSection>
<StyledGrayContainer> <StyledGrayContainer>
<div> <div>
<Typography component="h3" variant="h2"> <Typography component="h3" variant="h4">
Other Community SDKs
</Typography> </Typography>
<Typography> <Typography>
<a <a

View File

@ -1,12 +1,13 @@
import React, { Fragment, VFC } from 'react'; import React, { Fragment, VFC } from 'react';
import { Link } from 'react-router-dom'; 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 { IntegrationIcon } from '../IntegrationIcon/IntegrationIcon';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import { Badge } from 'component/common/Badge/Badge'; import { Badge } from 'component/common/Badge/Badge';
import { IntegrationCardMenu } from './IntegrationCardMenu/IntegrationCardMenu'; import { IntegrationCardMenu } from './IntegrationCardMenu/IntegrationCardMenu';
import type { AddonSchema } from 'openapi'; import type { AddonSchema } from 'openapi';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
interface IIntegrationCardProps { interface IIntegrationCardProps {
id?: string | number; id?: string | number;
@ -70,6 +71,10 @@ const StyledAction = styled(Typography)(({ theme }) => ({
gap: theme.spacing(0.5), gap: theme.spacing(0.5),
})); }));
const StyledOpenInNewIcon = styled(OpenInNewIcon)(({ theme }) => ({
fontSize: theme.fontSizes.bodySize,
}));
export const IntegrationCard: VFC<IIntegrationCardProps> = ({ export const IntegrationCard: VFC<IIntegrationCardProps> = ({
icon, icon,
title, title,
@ -109,7 +114,12 @@ export const IntegrationCard: VFC<IIntegrationCardProps> = ({
{description} {description}
</Typography> </Typography>
<StyledAction data-loading> <StyledAction data-loading>
{configureActionText} <ChevronRightIcon /> {configureActionText}
<ConditionallyRender
condition={isExternal}
show={<StyledOpenInNewIcon />}
elseShow={<ChevronRightIcon />}
/>
</StyledAction> </StyledAction>
</Fragment> </Fragment>
); );

View File

@ -15,7 +15,7 @@ import {
StyledTopRow, StyledTopRow,
} from './Project.styles'; } from './Project.styles';
import { Box, Paper, Tabs, Typography } from '@mui/material'; 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 useToast from 'hooks/useToast';
import useQueryParams from 'hooks/useQueryParams'; import useQueryParams from 'hooks/useQueryParams';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
@ -24,11 +24,7 @@ import { ProjectFeaturesArchive } from './ProjectFeaturesArchive/ProjectFeatures
import ProjectOverview from './ProjectOverview'; import ProjectOverview from './ProjectOverview';
import ProjectHealth from './ProjectHealth/ProjectHealth'; import ProjectHealth from './ProjectHealth/ProjectHealth';
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton'; import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
import { import { UPDATE_FEATURE } from 'component/providers/AccessProvider/permissions';
UPDATE_FEATURE,
DELETE_PROJECT,
UPDATE_PROJECT,
} from 'component/providers/AccessProvider/permissions';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { Navigate, Route, Routes, useLocation } from 'react-router-dom'; import { Navigate, Route, Routes, useLocation } from 'react-router-dom';

View File

@ -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 { useProjectDoraMetrics } from 'hooks/api/getters/useProjectDoraMetrics/useProjectDoraMetrics';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import { useMemo } from 'react'; import { useMemo } from 'react';
@ -57,7 +57,7 @@ export const ProjectDoraMetrics = () => {
width: '50%', width: '50%',
Cell: ({ Cell: ({
row: { row: {
original: { name, description }, original: { name },
}, },
}: any) => { }: any) => {
return ( return (
@ -129,7 +129,6 @@ export const ProjectDoraMetrics = () => {
rows, rows,
prepareRow, prepareRow,
state: { globalFilter }, state: { globalFilter },
setGlobalFilter,
} = useTable( } = useTable(
{ {
columns: columns as any[], // TODO: fix after `react-table` v8 update columns: columns as any[], // TODO: fix after `react-table` v8 update