mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
fix: fixes an issue where the new feedback button on the config strategy pane (#9638)
This commit is contained in:
parent
f97924eb36
commit
7f98709730
@ -33,17 +33,16 @@ interface IFeatureStrategyMenuProps {
|
|||||||
matchWidth?: boolean;
|
matchWidth?: boolean;
|
||||||
size?: IPermissionButtonProps['size'];
|
size?: IPermissionButtonProps['size'];
|
||||||
disableReason?: string;
|
disableReason?: string;
|
||||||
|
allowReleasePlanFeedback?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const StyledStrategyMenu = styled('div')(({ theme }) => ({
|
const StyledStrategyMenu = styled('div')(({ theme }) => ({
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
width: '100%',
|
|
||||||
flexFlow: 'row',
|
flexFlow: 'row',
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'flex-end',
|
||||||
gap: theme.spacing(1),
|
gap: theme.spacing(1),
|
||||||
'& > :nth-child(2)': {
|
|
||||||
marginLeft: 'auto',
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledAdditionalMenuButton = styled(PermissionButton)(({ theme }) => ({
|
const StyledAdditionalMenuButton = styled(PermissionButton)(({ theme }) => ({
|
||||||
@ -62,6 +61,10 @@ const StyledLink = styled(Link<typeof RouterLink | 'a'>)(({ theme }) => ({
|
|||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const Spacer = styled('div')(({ theme }) => ({
|
||||||
|
flex: 1,
|
||||||
|
}));
|
||||||
|
|
||||||
export const FeatureStrategyMenu = ({
|
export const FeatureStrategyMenu = ({
|
||||||
label,
|
label,
|
||||||
projectId,
|
projectId,
|
||||||
@ -71,6 +74,7 @@ export const FeatureStrategyMenu = ({
|
|||||||
size,
|
size,
|
||||||
matchWidth,
|
matchWidth,
|
||||||
disableReason,
|
disableReason,
|
||||||
|
allowReleasePlanFeedback = false,
|
||||||
}: IFeatureStrategyMenuProps) => {
|
}: IFeatureStrategyMenuProps) => {
|
||||||
const [anchor, setAnchor] = useState<Element>();
|
const [anchor, setAnchor] = useState<Element>();
|
||||||
const [onlyReleasePlans, setOnlyReleasePlans] = useState<boolean>(false);
|
const [onlyReleasePlans, setOnlyReleasePlans] = useState<boolean>(false);
|
||||||
@ -176,6 +180,8 @@ export const FeatureStrategyMenu = ({
|
|||||||
return (
|
return (
|
||||||
<StyledStrategyMenu onClick={(event) => event.stopPropagation()}>
|
<StyledStrategyMenu onClick={(event) => event.stopPropagation()}>
|
||||||
{displayReleasePlanButton ? (
|
{displayReleasePlanButton ? (
|
||||||
|
<>
|
||||||
|
{allowReleasePlanFeedback ? (
|
||||||
<>
|
<>
|
||||||
<StyledLink
|
<StyledLink
|
||||||
component='a'
|
component='a'
|
||||||
@ -186,6 +192,9 @@ export const FeatureStrategyMenu = ({
|
|||||||
>
|
>
|
||||||
Give feedback to release templates
|
Give feedback to release templates
|
||||||
</StyledLink>
|
</StyledLink>
|
||||||
|
<Spacer />
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
data-testid='ADD_TEMPLATE_BUTTON'
|
data-testid='ADD_TEMPLATE_BUTTON'
|
||||||
permission={CREATE_FEATURE_STRATEGY}
|
permission={CREATE_FEATURE_STRATEGY}
|
||||||
|
@ -43,8 +43,8 @@ const NewStyledAccordionDetails = styled(AccordionDetails)(({ theme }) => ({
|
|||||||
const StyledAccordionFooter = styled('footer')(({ theme }) => ({
|
const StyledAccordionFooter = styled('footer')(({ theme }) => ({
|
||||||
padding: theme.spacing(2, 3, 3),
|
padding: theme.spacing(2, 3, 3),
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'row',
|
||||||
alignItems: 'flex-end',
|
justifyContent: 'end',
|
||||||
gap: theme.spacing(2),
|
gap: theme.spacing(2),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -131,6 +131,7 @@ export const FeatureOverviewEnvironment = ({
|
|||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
featureId={featureId}
|
featureId={featureId}
|
||||||
environmentId={environment.name}
|
environmentId={environment.name}
|
||||||
|
allowReleasePlanFeedback={true}
|
||||||
/>
|
/>
|
||||||
{isOss() && environment?.type === 'production' ? (
|
{isOss() && environment?.type === 'production' ? (
|
||||||
<UpgradeChangeRequests />
|
<UpgradeChangeRequests />
|
||||||
|
Loading…
Reference in New Issue
Block a user