diff --git a/frontend/.github/workflows/release_changelog.yml b/frontend/.github/workflows/release_changelog.yml index 223175691a..52d02d0151 100644 --- a/frontend/.github/workflows/release_changelog.yml +++ b/frontend/.github/workflows/release_changelog.yml @@ -22,5 +22,6 @@ jobs: tag_name: ${{ github.ref }} release_name: ${{ github.ref }} body: ${{ steps.github_release.outputs.changelog }} + prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} diff --git a/frontend/package.json b/frontend/package.json index ae34a79117..eb1f9eae80 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "unleash-frontend", "description": "unleash your features", - "version": "4.14.0-beta.6", + "version": "4.14.1", "keywords": [ "unleash", "feature toggle", diff --git a/frontend/src/component/admin/groups/Group/Group.tsx b/frontend/src/component/admin/groups/Group/Group.tsx index f50bd58b92..d7ccb7d91c 100644 --- a/frontend/src/component/admin/groups/Group/Group.tsx +++ b/frontend/src/component/admin/groups/Group/Group.tsx @@ -132,13 +132,7 @@ export const Group: VFC = () => { align: 'center', Cell: ({ row: { original: rowUser } }: any) => ( - + { setSelectedUser(rowUser); @@ -151,9 +145,7 @@ export const Group: VFC = () => { { diff --git a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx index 9a387b06fd..d5ef3190c3 100644 --- a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx +++ b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx @@ -24,6 +24,10 @@ const StyledInput = styled(Input)(({ theme }) => ({ marginBottom: theme.spacing(2), })); +const StyledGroupFormUsersTableWrapper = styled('div')(({ theme }) => ({ + marginBottom: theme.spacing(6), +})); + const StyledButtonContainer = styled('div')(() => ({ marginTop: 'auto', display: 'flex', @@ -101,10 +105,12 @@ export const GroupForm: FC = ({ users={users} setUsers={setUsers} /> - + + + } /> diff --git a/frontend/src/component/admin/groups/GroupForm/GroupFormUsersTable/GroupFormUsersTable.tsx b/frontend/src/component/admin/groups/GroupForm/GroupFormUsersTable/GroupFormUsersTable.tsx index abbfc907e5..b25d8cf80c 100644 --- a/frontend/src/component/admin/groups/GroupForm/GroupFormUsersTable/GroupFormUsersTable.tsx +++ b/frontend/src/component/admin/groups/GroupForm/GroupFormUsersTable/GroupFormUsersTable.tsx @@ -83,9 +83,7 @@ export const GroupFormUsersTable: VFC = ({ diff --git a/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCard.tsx b/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCard.tsx index 2f78c3e6bc..8373b42d2e 100644 --- a/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCard.tsx +++ b/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCard.tsx @@ -102,11 +102,9 @@ export const GroupCard = ({ group }: IGroupCardProps) => { ))} elseShow={ Not used diff --git a/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCardActions/GroupCardActions.tsx b/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCardActions/GroupCardActions.tsx index 24fc4db856..3106eb91ca 100644 --- a/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCardActions/GroupCardActions.tsx +++ b/frontend/src/component/admin/groups/GroupsList/GroupCard/GroupCardActions/GroupCardActions.tsx @@ -52,13 +52,7 @@ export const GroupCardActions: FC = ({ e.stopPropagation(); }} > - + { const theme = useTheme(); @@ -35,9 +37,10 @@ const PercentageCircle = ({ display: 'flex', justifyContent: 'center', alignItems: 'center', + fontSize: '12px', }} > - 100% + {hideNumber ? null : '100%'} ); } diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/FeatureStrategyEmpty.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/FeatureStrategyEmpty.tsx index 060b9a6dc4..2bd7481087 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/FeatureStrategyEmpty.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/FeatureStrategyEmpty.tsx @@ -8,6 +8,7 @@ import { FeatureStrategyMenu } from '../FeatureStrategyMenu/FeatureStrategyMenu' import { PresetCard } from './PresetCard/PresetCard'; import { useStyles } from './FeatureStrategyEmpty.styles'; import { formatUnknownError } from 'utils/formatUnknownError'; +import { useFeatureImmutable } from 'hooks/api/getters/useFeature/useFeatureImmutable'; import { getFeatureStrategyIcon } from 'utils/strategyNames'; interface IFeatureStrategyEmptyProps { @@ -25,9 +26,15 @@ export const FeatureStrategyEmpty = ({ const { addStrategyToFeature } = useFeatureStrategyApi(); const { setToastData, setToastApiError } = useToast(); const { refetchFeature } = useFeature(projectId, featureId); + const { refetchFeature: refetchFeatureImmutable } = useFeatureImmutable( + projectId, + featureId + ); const onAfterAddStrategy = () => { refetchFeature(); + refetchFeatureImmutable(); + setToastData({ title: 'Strategy created', text: 'Successfully created strategy', @@ -96,6 +103,8 @@ export const FeatureStrategyEmpty = ({ title="Standard strategy" Icon={getFeatureStrategyIcon('default')} onClick={onAddSimpleStrategy} + projectId={projectId} + environmentId={environmentId} > The standard strategy is strictly on/off for your entire userbase. @@ -104,6 +113,8 @@ export const FeatureStrategyEmpty = ({ title="Gradual rollout" Icon={getFeatureStrategyIcon('flexibleRollout')} onClick={onAddGradualRolloutStrategy} + projectId={projectId} + environmentId={environmentId} > Roll out to a percentage of your userbase. diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/PresetCard/PresetCard.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/PresetCard/PresetCard.tsx index 345550d059..a6603fe019 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/PresetCard/PresetCard.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyEmpty/PresetCard/PresetCard.tsx @@ -1,8 +1,12 @@ import { ElementType, FC } from 'react'; -import { Button, Card, CardContent, styled, Typography } from '@mui/material'; +import { Card, CardContent, Typography, styled, Box } from '@mui/material'; +import PermissionButton from 'component/common/PermissionButton/PermissionButton'; +import { CREATE_FEATURE_STRATEGY } from 'component/providers/AccessProvider/permissions'; interface IPresetCardProps { title: string; + projectId: string; + environmentId: string; onClick: () => void; Icon: ElementType; } @@ -17,6 +21,8 @@ export const PresetCard: FC = ({ title, children, Icon, + projectId, + environmentId, onClick, }) => ( @@ -34,14 +40,18 @@ export const PresetCard: FC = ({ {children} - + + + Use template + + ); diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyExecution/StrategyExecution.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyExecution/StrategyExecution.tsx index 804615d3fa..380ba8c3c4 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyExecution/StrategyExecution.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyExecution/StrategyExecution.tsx @@ -50,6 +50,7 @@ export const StrategyExecution = ({ strategy }: IStrategyExecutionProps) => { sx={{ display: 'flex', alignItems: 'center' }} > = ({ return ( - + ({ height: '100vh', + overflow: 'auto', padding: theme.spacing(7.5, 6), '& .header': { padding: theme.spacing(0, 0, 2, 0),