Skip to content

Commit

Permalink
chore: mark release management as an enterprise feature (#9229)
Browse files Browse the repository at this point in the history
https://linear.app/unleash/issue/2-3093/sales-pitch-ui-for-release-management-to-show-non-enterprise-users

Marks Release Management as a premium Enterprise feature.

Once the `releasePlans` flag is enabled for everyone / removed, this is
what non-Enterprise users will see:


![image](https://github.com/user-attachments/assets/7191fb09-976e-4e14-8e2f-6db114b5e2ca)
  • Loading branch information
nunogois authored Feb 6, 2025
1 parent 2ff385a commit 4871cd5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
23 changes: 15 additions & 8 deletions frontend/src/component/common/PremiumFeature/PremiumFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ const PremiumFeatures = {
url: 'https://docs.getunleash.io/reference/environments',
label: 'Environments management',
},
releaseManagement: {
plan: FeaturePlan.ENTERPRISE,
url: '',
label: 'Release management',
},
};

type PremiumFeatureType = keyof typeof PremiumFeatures;
Expand Down Expand Up @@ -255,14 +260,16 @@ export const PremiumFeature = ({
</Button>
)}

<Button
href={url}
target='_blank'
rel='noreferrer'
onClick={trackReadAbout}
>
Read about {label}
</Button>
{url && (
<Button
href={url}
target='_blank'
rel='noreferrer'
onClick={trackReadAbout}
>
Read about {label}
</Button>
)}
</StyledButtonContainer>
</>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ exports[`returns all baseRoutes 1`] = `
},
{
"component": [Function],
"enterprise": true,
"flag": "releasePlans",
"menu": {
"advanced": true,
Expand Down
1 change: 0 additions & 1 deletion frontend/src/component/menu/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ export const routes: IRoute[] = [
type: 'protected',
menu: { advanced: true, mode: ['enterprise'] },
flag: 'releasePlans',
enterprise: true,
},
{
path: '/release-management/create-template',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { EmptyTemplatesListMessage } from './EmptyTemplatesListMessage';
import { ReleasePlanTemplateList } from './ReleasePlanTemplateList';
import { useUiFlag } from 'hooks/useUiFlag';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { PremiumFeature } from 'component/common/PremiumFeature/PremiumFeature';

export const ReleaseManagement = () => {
usePageTitle('Release management');
Expand All @@ -24,6 +25,10 @@ export const ReleaseManagement = () => {
return null;
}

if (!isEnterprise()) {
return <PremiumFeature feature='releaseManagement' page />;
}

return (
<>
<PageContent
Expand Down

0 comments on commit 4871cd5

Please sign in to comment.