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

improvements

This commit is contained in:
andreas-unleash 2022-08-08 13:53:28 +03:00
parent 3b2947e9af
commit 90685cef22
24 changed files with 18 additions and 20 deletions

View File

@ -4,7 +4,7 @@ import {
} from '../../../../../../hooks/api/actions/usePlayground/playground.model';
import { Alert, IconButton, Typography, useTheme } from '@mui/material';
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
import { useStyles } from './PlaygroundResultFeatureDetails.styles';
import { useStyles } from './FeatureDetails.styles';
import { CloseOutlined } from '@mui/icons-material';
import React from 'react';
import { ConditionallyRender } from '../../../../../common/ConditionallyRender/ConditionallyRender';
@ -19,7 +19,7 @@ interface PlaygroundFeatureResultDetailsProps {
input?: PlaygroundRequestSchema;
onClose: () => void;
}
export const PlaygroundResultFeatureDetails = ({
export const FeatureDetails = ({
feature,
input,
onClose,

View File

@ -6,8 +6,8 @@ import { IconButton, Popover, styled } from '@mui/material';
import { InfoOutlined } from '@mui/icons-material';
import React, { useRef, useState } from 'react';
import { useStyles } from './FeatureResultInfoPopoverCell.styles';
import { PlaygroundResultFeatureDetails } from './PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails';
import { PlaygroundResultFeatureStrategyList } from './PlaygroundResultFeatureStrategyList/PlaygroundResultFeatureStrategyList';
import { FeatureDetails } from './FeatureDetails/FeatureDetails';
import { PlaygroundResultFeatureStrategyList } from './FeatureStrategyList/PlaygroundResultFeatureStrategyList';
interface FeatureResultInfoPopoverCellProps {
feature: PlaygroundFeatureSchema;
@ -54,7 +54,7 @@ export const FeatureResultInfoPopoverCell = ({
}}
classes={{ paper: styles.popoverPaper }}
>
<PlaygroundResultFeatureDetails
<FeatureDetails
feature={feature}
input={input}
onClose={() => setOpen(false)}

View File

@ -1,4 +1,4 @@
import { PlaygroundResultStrategyLists } from './PlaygroundResultStrategyList/playgroundResultStrategyLists';
import { PlaygroundResultStrategyLists } from './StrategyList/playgroundResultStrategyLists';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import {
PlaygroundFeatureSchema,

View File

@ -13,14 +13,12 @@ interface IFeatureStrategyItemProps {
strategy: PlaygroundStrategySchema;
index: number;
input?: PlaygroundRequestSchema;
compact: boolean;
}
export const FeatureStrategyItem = ({
strategy,
input,
index,
compact,
}: IFeatureStrategyItemProps) => {
const { result } = strategy;
const { classes: styles } = useStyles();

View File

@ -7,7 +7,7 @@ import {
Theme,
useTheme,
} from '@mui/material';
import { PlaygroundConstraintAccordionViewHeader } from './PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeader';
import { ConstraintAccordionViewHeader } from './ConstraintAccordionViewHeader/ConstraintAccordionViewHeader';
import { oneOf } from 'utils/oneOf';
import {
dateOperators,
@ -73,7 +73,7 @@ export const ConstraintAccordionView: VFC<IConstraintAccordionViewProps> = ({
backgroundColor: backgroundColor,
}}
>
<PlaygroundConstraintAccordionViewHeader
<ConstraintAccordionViewHeader
constraint={constraint}
singleValue={singleValue}
allowExpand={setExpandable}

View File

@ -1,5 +1,5 @@
import { ConstraintIcon } from 'component/common/ConstraintAccordion/ConstraintIcon';
import { PlaygroundConstraintAccordionViewHeaderInfo } from './PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo';
import { ConstraintAccordionViewHeaderInfo } from './ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo';
import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles';
import {
PlaygroundConstraintSchema,
@ -15,7 +15,7 @@ interface PlaygroundConstraintAccordionViewHeaderProps {
maxLength?: number;
}
export const PlaygroundConstraintAccordionViewHeader = ({
export const ConstraintAccordionViewHeader = ({
constraint,
singleValue,
allowExpand,
@ -28,7 +28,7 @@ export const PlaygroundConstraintAccordionViewHeader = ({
return (
<div className={styles.headerContainer}>
<ConstraintIcon />
<PlaygroundConstraintAccordionViewHeaderInfo
<ConstraintAccordionViewHeaderInfo
constraint={constraint}
singleValue={singleValue}
allowExpand={allowExpand}

View File

@ -1,7 +1,7 @@
import { styled, Tooltip, Typography, useTheme } from '@mui/material';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { PlaygroundConstraintAccordionViewHeaderSingleValue } from './PlaygroundContraintAccordionViewHeaderSingleValue/PlaygroundConstraintAccordionViewHeaderSingleValue';
import { PLaygroundConstraintAccordionViewHeaderMultipleValues } from './PlaygroundContraintAccordionViewHeaderMultipleValues/PLaygroundConstraintAccordionViewHeaderMultipleValues';
import { PlaygroundSingleValue } from './PlaygroundSingleValue/PlaygroundSingleValue';
import { PLaygroundMultipleValues } from './PlaygroundMultipleValues/PLaygroundMultipleValues';
import React from 'react';
import { useStyles } from '../../ConstraintAccordion.styles';
import { CancelOutlined } from '@mui/icons-material';
@ -48,7 +48,7 @@ interface PlaygroundConstraintAccordionViewHeaderInfoProps {
playgroundInput?: PlaygroundRequestSchema;
}
export const PlaygroundConstraintAccordionViewHeaderInfo = ({
export const ConstraintAccordionViewHeaderInfo = ({
constraint,
singleValue,
allowExpand,
@ -87,13 +87,13 @@ export const PlaygroundConstraintAccordionViewHeaderInfo = ({
<ConditionallyRender
condition={singleValue}
show={
<PlaygroundConstraintAccordionViewHeaderSingleValue
<PlaygroundSingleValue
constraint={constraint}
allowExpand={allowExpand}
/>
}
elseShow={
<PLaygroundConstraintAccordionViewHeaderMultipleValues
<PLaygroundMultipleValues
constraint={constraint}
expanded={expanded}
allowExpand={allowExpand}