1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-02 01:17:58 +02: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'; } from '../../../../../../hooks/api/actions/usePlayground/playground.model';
import { Alert, IconButton, Typography, useTheme } from '@mui/material'; import { Alert, IconButton, Typography, useTheme } from '@mui/material';
import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip'; import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip';
import { useStyles } from './PlaygroundResultFeatureDetails.styles'; import { useStyles } from './FeatureDetails.styles';
import { CloseOutlined } from '@mui/icons-material'; import { CloseOutlined } from '@mui/icons-material';
import React from 'react'; import React from 'react';
import { ConditionallyRender } from '../../../../../common/ConditionallyRender/ConditionallyRender'; import { ConditionallyRender } from '../../../../../common/ConditionallyRender/ConditionallyRender';
@ -19,7 +19,7 @@ interface PlaygroundFeatureResultDetailsProps {
input?: PlaygroundRequestSchema; input?: PlaygroundRequestSchema;
onClose: () => void; onClose: () => void;
} }
export const PlaygroundResultFeatureDetails = ({ export const FeatureDetails = ({
feature, feature,
input, input,
onClose, onClose,

View File

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

View File

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

View File

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

View File

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

View File

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