mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
feat: warn about sdk update with feature dependencies (#5065)
This commit is contained in:
parent
db04a1eaa8
commit
163545de8c
@ -114,6 +114,8 @@ test('Add dependency', async () => {
|
||||
const addButton = await screen.findByText('Add');
|
||||
userEvent.click(addButton);
|
||||
|
||||
await screen.findByText('Client SDK support for feature dependencies');
|
||||
|
||||
await waitFor(() => {
|
||||
expect(closed).toBe(true);
|
||||
});
|
||||
|
@ -13,6 +13,7 @@ import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequ
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||
import { DependenciesUpgradeAlert } from './DependenciesUpgradeAlert';
|
||||
|
||||
interface IAddDependencyDialogueProps {
|
||||
project: string;
|
||||
@ -189,10 +190,12 @@ export const AddDependencyDialogue = ({
|
||||
secondaryButtonText='Cancel'
|
||||
>
|
||||
<Box>
|
||||
<DependenciesUpgradeAlert />
|
||||
<Box sx={{ mt: 2, mb: 4 }}>
|
||||
Your feature will be evaluated only when the selected parent
|
||||
feature is enabled in the same environment.
|
||||
<br />
|
||||
<br />
|
||||
</Box>
|
||||
|
||||
<Typography>What feature do you want to depend on?</Typography>
|
||||
<ConditionallyRender
|
||||
condition={showDependencyDialogue}
|
||||
|
@ -0,0 +1,22 @@
|
||||
import { Alert } from '@mui/material';
|
||||
|
||||
export const DependenciesUpgradeAlert = () => {
|
||||
return (
|
||||
<Alert severity='warning'>
|
||||
Remember to update your Unleash client! Feature dependencies require
|
||||
new SDK versions. Read more about <DependenciesDocsLink />.
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
|
||||
const DependenciesDocsLink = () => {
|
||||
return (
|
||||
<a
|
||||
href='https://docs.getunleash.io/reference/dependent-features#client-sdk-support'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Client SDK support for feature dependencies
|
||||
</a>
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user