diff --git a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionView.tsx b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionView.tsx index 5d1e457159..bead8645b0 100644 --- a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionView.tsx +++ b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionView.tsx @@ -5,7 +5,6 @@ import { AccordionDetails, SxProps, Theme, - useTheme, } from '@mui/material'; import { IConstraint } from 'interfaces/strategy'; import { ConstraintAccordionViewBody } from './ConstraintAccordionViewBody/ConstraintAccordionViewBody'; @@ -34,7 +33,6 @@ export const ConstraintAccordionView = ({ const { classes: styles } = useStyles(); const [expandable, setExpandable] = useState(true); const [expanded, setExpanded] = useState(false); - const theme = useTheme(); const singleValue = oneOf( [...semVerOperators, ...numOperators, ...dateOperators], diff --git a/frontend/src/component/common/StrategySeparator/StrategySeparator.tsx b/frontend/src/component/common/StrategySeparator/StrategySeparator.tsx index 30d26b0d69..1b97041f76 100644 --- a/frontend/src/component/common/StrategySeparator/StrategySeparator.tsx +++ b/frontend/src/component/common/StrategySeparator/StrategySeparator.tsx @@ -1,9 +1,8 @@ -import { Box, styled, useTheme, SxProps, Theme } from '@mui/material'; +import { Box, styled, useTheme } from '@mui/material'; import { ConditionallyRender } from '../ConditionallyRender/ConditionallyRender'; interface IStrategySeparatorProps { text: 'AND' | 'OR'; - sx?: SxProps; } const StyledContent = styled('div')(({ theme }) => ({ @@ -29,7 +28,7 @@ const StyledCenteredContent = styled(StyledContent)(({ theme }) => ({ borderRadius: theme.shape.borderRadiusLarge, })); -export const StrategySeparator = ({ text, sx }: IStrategySeparatorProps) => { +export const StrategySeparator = ({ text }: IStrategySeparatorProps) => { const theme = useTheme(); return ( @@ -38,7 +37,6 @@ export const StrategySeparator = ({ text, sx }: IStrategySeparatorProps) => { height: theme.spacing(text === 'AND' ? 1 : 1.5), position: 'relative', width: '100%', - ..sx }} > { setOpen(!open); diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.styles.ts b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.styles.ts index bb59b48574..d436675733 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.styles.ts +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.styles.ts @@ -14,7 +14,7 @@ export const useStyles = makeStyles()(theme => ({ marginTop: '12px', }, alertRow: { - margin: theme.spacing(1,0), + margin: theme.spacing(1, 0), }, descriptionRow: { marginBottom: theme.spacing(2), diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx index 98a5d45278..0718c2235a 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx @@ -23,22 +23,19 @@ export const PlaygroundResultFeatureDetails = ({ const { classes: styles } = useStyles(); const theme = useTheme(); - const description = - feature.isEnabled - ? `This feature toggle is True in ${input?.environment} because ` - : `This feature toggle is False in ${input?.environment} because `; + const description = feature.isEnabled + ? `This feature toggle is True in ${input?.environment} because ` + : `This feature toggle is False in ${input?.environment} because `; - const reason = - feature.isEnabled - ? 'at least one strategy is True' - : !feature.isEnabledInCurrentEnvironment - ? 'the environment is disabled' - : 'all strategies are False'; + const reason = feature.isEnabled + ? 'at least one strategy is True' + : !feature.isEnabledInCurrentEnvironment + ? 'the environment is disabled' + : 'all strategies are False'; - const color = - feature.isEnabled - ? theme.palette.success.main - : theme.palette.error.main; + const color = feature.isEnabled + ? theme.palette.success.main + : theme.palette.error.main; const noValueTxt = checkForEmptyValues(input?.context) ? 'You did not provide a value for your context field in step 2 of the configuration' @@ -61,10 +58,7 @@ export const PlaygroundResultFeatureDetails = ({ diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultFeatureStrategyList.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultFeatureStrategyList.tsx index 8f89cbea18..5941210c61 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultFeatureStrategyList.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultFeatureStrategyList.tsx @@ -20,7 +20,10 @@ export const PlaygroundResultFeatureStrategyList = ({ }: PlaygroundResultFeatureStrategyListProps) => { return ( 0} show={} /> - - + + {index + 1} diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeader.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeader.tsx index 85d40bf5a6..0887257ed8 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeader.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeader.tsx @@ -1,9 +1,10 @@ -import {ConstraintIcon} from 'component/common/ConstraintAccordion/ConstraintIcon'; +import { ConstraintIcon } from 'component/common/ConstraintAccordion/ConstraintIcon'; +import { PlaygroundConstraintAccordionViewHeaderInfo } from './PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo'; +import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles'; import { - PlaygroundConstraintAccordionViewHeaderInfo -} from './PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo'; -import {useStyles} from 'component/common/ConstraintAccordion/ConstraintAccordion.styles'; -import {PlaygroundConstraintSchema, PlaygroundRequestSchema,} from 'hooks/api/actions/usePlayground/playground.model'; + PlaygroundConstraintSchema, + PlaygroundRequestSchema, +} from 'hooks/api/actions/usePlayground/playground.model'; interface PlaygroundConstraintAccordionViewHeaderProps { constraint: PlaygroundConstraintSchema; diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo.tsx index a36adfc171..545af11a2e 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundConstraintAccordionViewHeaderInfo/PlaygroundConstraintAccordionViewHeaderInfo.tsx @@ -5,10 +5,11 @@ import { PLaygroundConstraintAccordionViewHeaderMultipleValues } from '../Playgr import React from 'react'; import { useStyles } from '../../PlaygroundConstraintAccordion.styles'; import { CancelOutlined } from '@mui/icons-material'; -import {PlaygroundConstraintSchema, PlaygroundRequestSchema} from 'hooks/api/actions/usePlayground/playground.model'; import { - ConstraintViewHeaderOperator -} from "component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintViewHeaderOperator/ConstraintViewHeaderOperator"; + PlaygroundConstraintSchema, + PlaygroundRequestSchema, +} from 'hooks/api/actions/usePlayground/playground.model'; +import { ConstraintViewHeaderOperator } from 'component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintViewHeaderOperator/ConstraintViewHeaderOperator'; const StyledHeaderText = styled('span')(({ theme }) => ({ display: '-webkit-box', @@ -59,8 +60,9 @@ export const PlaygroundConstraintAccordionViewHeaderInfo = ({ const { classes: styles } = useStyles(); const theme = useTheme(); - const constraintExistsInContext = - Boolean(playgroundInput?.context[constraint.contextName]); + const constraintExistsInContext = Boolean( + playgroundInput?.context[constraint.contextName] + ); return ( @@ -76,9 +78,8 @@ export const PlaygroundConstraintAccordionViewHeaderInfo = ({ : theme.palette.error.main } > - {playgroundInput?.context[ - constraint.contextName - ] || 'no value'} + {playgroundInput?.context[constraint.contextName] || + 'no value'} diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderMultipleValues/PLaygroundConstraintAccordionViewHeaderMultipleValues.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderMultipleValues/PLaygroundConstraintAccordionViewHeaderMultipleValues.tsx index adeca0b91e..e59be08470 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderMultipleValues/PLaygroundConstraintAccordionViewHeaderMultipleValues.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderMultipleValues/PLaygroundConstraintAccordionViewHeaderMultipleValues.tsx @@ -1,9 +1,9 @@ -import {ConditionallyRender} from 'component/common/ConditionallyRender/ConditionallyRender'; -import {styled, Typography} from '@mui/material'; -import React, {useEffect, useMemo, useState} from 'react'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; +import { styled, Typography } from '@mui/material'; +import React, { useEffect, useMemo, useState } from 'react'; import classnames from 'classnames'; -import {useStyles} from '../../PlaygroundConstraintAccordion.styles'; -import {PlaygroundConstraintSchema} from 'hooks/api/actions/usePlayground/playground.model'; +import { useStyles } from '../../PlaygroundConstraintAccordion.styles'; +import { PlaygroundConstraintSchema } from 'hooks/api/actions/usePlayground/playground.model'; const StyledValuesSpan = styled('span')(({ theme }) => ({ display: '-webkit-box', diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderSingleValue/PlaygroundConstraintAccordionViewHeaderSingleValue.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderSingleValue/PlaygroundConstraintAccordionViewHeaderSingleValue.tsx index 9d7ac3b66e..1347541063 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderSingleValue/PlaygroundConstraintAccordionViewHeaderSingleValue.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundConstraintAccordionViewHeader/PlaygroundContraintAccordionViewHeaderSingleValue/PlaygroundConstraintAccordionViewHeaderSingleValue.tsx @@ -1,10 +1,10 @@ -import React, {useEffect} from 'react'; -import {Chip, styled, Typography} from '@mui/material'; -import {formatConstraintValue} from 'utils/formatConstraintValue'; -import {useStyles} from '../../PlaygroundConstraintAccordion.styles'; -import {useLocationSettings} from 'hooks/useLocationSettings'; -import {PlaygroundConstraintSchema} from 'hooks/api/actions/usePlayground/playground.model'; -import {ConditionallyRender} from 'component/common/ConditionallyRender/ConditionallyRender'; +import React, { useEffect } from 'react'; +import { Chip, styled, Typography } from '@mui/material'; +import { formatConstraintValue } from 'utils/formatConstraintValue'; +import { useStyles } from '../../PlaygroundConstraintAccordion.styles'; +import { useLocationSettings } from 'hooks/useLocationSettings'; +import { PlaygroundConstraintSchema } from 'hooks/api/actions/usePlayground/playground.model'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; const StyledSingleValueChip = styled(Chip)(({ theme }) => ({ margin: 'auto 0', diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView.tsx index 95f2f516f6..8d057d222b 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView.tsx @@ -19,9 +19,7 @@ import { PlaygroundConstraintSchema, PlaygroundRequestSchema, } from 'hooks/api/actions/usePlayground/playground.model'; -import { - ConstraintAccordionViewBody -} from "component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewBody/ConstraintAccordionViewBody"; +import { ConstraintAccordionViewBody } from 'component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewBody/ConstraintAccordionViewBody'; interface IConstraintAccordionViewProps { constraint: PlaygroundConstraintSchema; diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintExecution.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintExecution.tsx index d5f3c6d7b1..cbfdcd486d 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintExecution.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultConstraintExecution/PlaygroundResultConstraintExecution.tsx @@ -7,9 +7,7 @@ import { objectId } from '../../../../../../../../../../utils/objectId'; import { ConditionallyRender } from '../../../../../../../../../common/ConditionallyRender/ConditionallyRender'; import { StrategySeparator } from '../../../../../../../../../common/StrategySeparator/StrategySeparator'; import { styled } from '@mui/material'; -import { - PlaygroundResultConstraintAccordionView -} from "./PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView"; +import { PlaygroundResultConstraintAccordionView } from './PlaygroundResultConstraintAccordion/PlaygroundResultConstraintAccordionView/PlaygroundResultConstraintAccordionView'; interface PlaygroundResultConstraintExecutionProps { constraints?: PlaygroundConstraintSchema[]; @@ -17,13 +15,11 @@ interface PlaygroundResultConstraintExecutionProps { input?: PlaygroundRequestSchema; } -export const PlaygroundResultConstraintExecutionWrapper = styled('div')( - () => ({ - width: '100%', - display: 'flex', - flexDirection: 'column', - }) -); +export const PlaygroundResultConstraintExecutionWrapper = styled('div')(() => ({ + width: '100%', + display: 'flex', + flexDirection: 'column', +})); export const PlaygroundResultConstraintExecution = ({ constraints, diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultSegmentExecution/PlaygroundResultSegmentExecution.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultSegmentExecution/PlaygroundResultSegmentExecution.tsx index 619dad0130..362559e07b 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultSegmentExecution/PlaygroundResultSegmentExecution.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultSegmentExecution/PlaygroundResultSegmentExecution.tsx @@ -43,10 +43,10 @@ const SegmentExecutionWrapper = styled('div')(({ theme }) => ({ marginTop: theme.spacing(2), }, background: theme.palette.neutral.light, - marginBottom: theme.spacing(1), + marginBottom: theme.spacing(1), })); -const SegmentExecutionConstraintWrapper = styled('div')(({ theme }) => ({ +const SegmentExecutionConstraintWrapper = styled('div')(() => ({ padding: '12px', })); @@ -55,7 +55,7 @@ const SegmentResultTextWrapper = styled('div')(({ theme }) => ({ display: 'inline-flex', justifyContent: 'center', marginRight: '12px', - gap: theme.spacing(1), + gap: theme.spacing(1), })); export const PlaygroundResultSegmentExecution = ({ @@ -109,7 +109,7 @@ export const PlaygroundResultSegmentExecution = ({ condition={ index === segments?.length - 1 && hasConstraints } - show={} + show={} /> ))} diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultStrategyExecution.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultStrategyExecution.tsx index 1ebb66b8e4..3f217b41fd 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultStrategyExecution.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/PlaygroundResultStrategyExecution.tsx @@ -96,7 +96,7 @@ export const PlaygroundResultStrategyExecution = ({ constraints={constraints} input={input} /> - + @@ -93,7 +95,9 @@ export const PlaygroundResultStrategyExecutionParameters = ({ } showReason={ Boolean(input?.context?.[getMappedParam(key)]) - ? !hosts.includes(input?.context?.[getMappedParam(key)]) + ? !hosts.includes( + input?.context?.[getMappedParam(key)] + ) : undefined } /> @@ -112,7 +116,9 @@ export const PlaygroundResultStrategyExecutionParameters = ({ } showReason={ Boolean(input?.context?.[getMappedParam(key)]) - ? !IPs.includes(input?.context?.[getMappedParam(key)]) + ? !IPs.includes( + input?.context?.[getMappedParam(key)] + ) : undefined } /> diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/helepers.ts b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/helepers.ts index 862e7178ba..8a40068ec3 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/helepers.ts +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/PlaygroundResultFeatureStrategyItem/PlaygroundResultStrategyExecution/helepers.ts @@ -7,8 +7,8 @@ export const getMappedParam = (key: string) => { case 'HostNames': return 'hostname'; case 'IPs': - return 'remoteAddress' + return 'remoteAddress'; default: return key; } -} +}; diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/playgroundResultStrategyLists.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/playgroundResultStrategyLists.tsx index c5eea38425..b3913b2210 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/playgroundResultStrategyLists.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureStrategyList/PlaygroundResultStrategyList/playgroundResultStrategyLists.tsx @@ -19,7 +19,7 @@ const StyledListWrapper = styled('div')(({ theme }) => ({ padding: theme.spacing(1, 0.5), })); -const StyledAlert = styled(Alert)(({ theme }) => ({ +const StyledAlert = styled(Alert)(() => ({ borderBottomLeftRadius: 0, borderBottomRightRadius: 0, })); @@ -70,11 +70,11 @@ export const WrappedPlaygroundResultStrategyList = ({ input, }: WrappedPlaygroundResultStrategyListProps) => { return ( - + If environment would be enabled then this feature would be{' '} - {feature.strategies.result ? 'TRUE' : 'FALSE'} and the strategies would - evaluate like this:{' '} + {feature.strategies.result ? 'TRUE' : 'FALSE'} and the + strategies would evaluate like this:{' '} { diff --git a/frontend/src/hooks/api/actions/usePlayground/playground.model.ts b/frontend/src/hooks/api/actions/usePlayground/playground.model.ts index 38307b932a..427d21a02c 100644 --- a/frontend/src/hooks/api/actions/usePlayground/playground.model.ts +++ b/frontend/src/hooks/api/actions/usePlayground/playground.model.ts @@ -201,8 +201,8 @@ export interface PlaygroundSegmentSchema { } export interface PlaygroundStrategyResultSchema { - result: boolean | "unknown"; - data?: Array + result: boolean | 'unknown'; + data?: Array; } export interface PlaygroundStrategySchema {