mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-12 01:17:04 +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;
|
||||
size?: IPermissionButtonProps['size'];
|
||||
disableReason?: string;
|
||||
allowReleasePlanFeedback?: boolean;
|
||||
}
|
||||
|
||||
const StyledStrategyMenu = styled('div')(({ theme }) => ({
|
||||
flexShrink: 0,
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
flexFlow: 'row',
|
||||
flex: 1,
|
||||
justifyContent: 'flex-end',
|
||||
gap: theme.spacing(1),
|
||||
'& > :nth-child(2)': {
|
||||
marginLeft: 'auto',
|
||||
},
|
||||
}));
|
||||
|
||||
const StyledAdditionalMenuButton = styled(PermissionButton)(({ theme }) => ({
|
||||
@ -62,6 +61,10 @@ const StyledLink = styled(Link<typeof RouterLink | 'a'>)(({ theme }) => ({
|
||||
textDecoration: 'none',
|
||||
}));
|
||||
|
||||
const Spacer = styled('div')(({ theme }) => ({
|
||||
flex: 1,
|
||||
}));
|
||||
|
||||
export const FeatureStrategyMenu = ({
|
||||
label,
|
||||
projectId,
|
||||
@ -71,6 +74,7 @@ export const FeatureStrategyMenu = ({
|
||||
size,
|
||||
matchWidth,
|
||||
disableReason,
|
||||
allowReleasePlanFeedback = false,
|
||||
}: IFeatureStrategyMenuProps) => {
|
||||
const [anchor, setAnchor] = useState<Element>();
|
||||
const [onlyReleasePlans, setOnlyReleasePlans] = useState<boolean>(false);
|
||||
@ -177,15 +181,20 @@ export const FeatureStrategyMenu = ({
|
||||
<StyledStrategyMenu onClick={(event) => event.stopPropagation()}>
|
||||
{displayReleasePlanButton ? (
|
||||
<>
|
||||
<StyledLink
|
||||
component='a'
|
||||
href={RELEASE_TEMPLATE_FEEDBACK}
|
||||
underline='hover'
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>
|
||||
Give feedback to release templates
|
||||
</StyledLink>
|
||||
{allowReleasePlanFeedback ? (
|
||||
<>
|
||||
<StyledLink
|
||||
component='a'
|
||||
href={RELEASE_TEMPLATE_FEEDBACK}
|
||||
underline='hover'
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>
|
||||
Give feedback to release templates
|
||||
</StyledLink>
|
||||
<Spacer />
|
||||
</>
|
||||
) : null}
|
||||
<PermissionButton
|
||||
data-testid='ADD_TEMPLATE_BUTTON'
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
|
@ -43,8 +43,8 @@ const NewStyledAccordionDetails = styled(AccordionDetails)(({ theme }) => ({
|
||||
const StyledAccordionFooter = styled('footer')(({ theme }) => ({
|
||||
padding: theme.spacing(2, 3, 3),
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-end',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'end',
|
||||
gap: theme.spacing(2),
|
||||
}));
|
||||
|
||||
@ -131,6 +131,7 @@ export const FeatureOverviewEnvironment = ({
|
||||
projectId={projectId}
|
||||
featureId={featureId}
|
||||
environmentId={environment.name}
|
||||
allowReleasePlanFeedback={true}
|
||||
/>
|
||||
{isOss() && environment?.type === 'production' ? (
|
||||
<UpgradeChangeRequests />
|
||||
|
Loading…
Reference in New Issue
Block a user