Skip to content

Commit 54393ec

Browse files
feat: [UIE-10778], [UIE-10777] - IAM LA/New flag fix, text update (#13571)
* UIE-10778: IAM LA/New flag fix * UIE-10777: IAM: text update * Added changeset: IAM: remove LA badge and add only New badge, text update for User's Account Delegation search result
1 parent 9407595 commit 54393ec

10 files changed

Lines changed: 21 additions & 43 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Changed
3+
---
4+
5+
IAM: remove LA badge and add only New badge, text update for User's Account Delegation search result ([#13571](https://github.com/linode/manager/pull/13571))

packages/manager/src/components/PrimaryNav/PrimaryNav.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export const PrimaryNav = (props: PrimaryNavProps) => {
137137
const { isDatabasesEnabled, isDatabasesV2Beta } = useIsDatabasesEnabled();
138138

139139
const { isIAMEnabled } = useIsIAMEnabled();
140-
const showLimitedAvailabilityBadges = flags.iamLimitedAvailabilityBadges;
141140

142141
const { isNetworkLoadBalancerEnabled } = useIsNetworkLoadBalancerEnabled();
143142

@@ -314,7 +313,7 @@ export const PrimaryNav = (props: PrimaryNavProps) => {
314313
display: 'Identity & Access',
315314
hide: !isIAMEnabled,
316315
to: '/iam',
317-
isNew: isIAMEnabled && showLimitedAvailabilityBadges,
316+
isNew: isIAMEnabled && flags.iamNewBadge,
318317
},
319318
{
320319
display: 'Quotas',

packages/manager/src/dev-tools/FeatureFlagTool.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ const options: { flag: keyof Flags; label: string }[] = [
7777
{ flag: 'apicliButtonCopy', label: 'APICLI Button Copy' },
7878
{ flag: 'iam', label: 'IAM enabled & Beta' },
7979
{
80-
flag: 'iamLimitedAvailabilityBadges',
81-
label: 'IAM Limited Availability Badges',
80+
flag: 'iamNewBadge',
81+
label: 'IAM New Badge',
8282
},
8383
{ flag: 'iamDelegation', label: 'IAM Delegation (Parent/Child)' },
8484
{

packages/manager/src/featureFlags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export interface Flags {
252252
hostnameEndpoints: boolean;
253253
iam: BaseFeatureFlag;
254254
iamDelegation: BaseFeatureFlag;
255-
iamLimitedAvailabilityBadges: boolean;
255+
iamNewBadge: boolean;
256256
ipv6Sharing: boolean;
257257
kubernetesBlackwellPlans: boolean;
258258
limitsEvolution: LimitsEvolution;

packages/manager/src/features/IAM/IAMLanding.tsx

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Chip, NewFeatureChip, styled } from '@linode/ui';
1+
import { NewFeatureChip } from '@linode/ui';
22
import { Outlet, useLocation, useNavigate } from '@tanstack/react-router';
33
import * as React from 'react';
44

@@ -20,8 +20,7 @@ import { IAM_DOCS_LINK, ROLES_LEARN_MORE_LINK } from './Shared/constants';
2020
export const IdentityAccessLanding = React.memo(() => {
2121
const flags = useFlags();
2222
const { isIAMEnabled } = useIsIAMEnabled();
23-
const showLimitedAvailabilityBadges =
24-
flags.iamLimitedAvailabilityBadges && isIAMEnabled;
23+
const showNewBadge = flags.iamNewBadge && isIAMEnabled;
2524
const location = useLocation();
2625
const navigate = useNavigate();
2726
const { isParentUserType } = useDelegationRole();
@@ -62,12 +61,7 @@ export const IdentityAccessLanding = React.memo(() => {
6261
{...landingHeaderProps}
6362
breadcrumbProps={{
6463
labelOptions: {
65-
suffixComponent: showLimitedAvailabilityBadges ? (
66-
<>
67-
<NewFeatureChip />
68-
<StyledLimitedAvailabilityChip label="Limited availability" />
69-
</>
70-
) : null,
64+
suffixComponent: showNewBadge ? <NewFeatureChip /> : null,
7165
},
7266
removeCrumbX: 1,
7367
}}
@@ -84,20 +78,3 @@ export const IdentityAccessLanding = React.memo(() => {
8478
</>
8579
);
8680
});
87-
88-
const StyledLimitedAvailabilityChip = styled(Chip, {
89-
label: 'StyledLimitedAvailabilityChip',
90-
shouldForwardProp: (prop) => prop !== 'color',
91-
})(({ theme }) => ({
92-
'& .MuiChip-label': {
93-
padding: 0,
94-
},
95-
background: theme.tokens.component.Badge.Informative.Subtle.Background,
96-
color: theme.tokens.component.Badge.Informative.Subtle.Text,
97-
font: theme.font.bold,
98-
fontSize: '12px',
99-
lineHeight: '12px',
100-
height: 16,
101-
letterSpacing: '.22px',
102-
padding: theme.spacingFunction(4),
103-
}));

packages/manager/src/features/IAM/Roles/Defaults/DefaultsLanding.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export const DefaultsLanding = () => {
1818
const navigate = useNavigate();
1919
const flags = useFlags();
2020
const { isIAMEnabled } = useIsIAMEnabled();
21-
const showLimitedAvailabilityBadges =
22-
flags.iamLimitedAvailabilityBadges && isIAMEnabled;
21+
const showNewBadge = flags.iamNewBadge && isIAMEnabled;
2322

2423
const { tabs, tabIndex, handleTabChange } = useTabs([
2524
{
@@ -46,7 +45,7 @@ export const DefaultsLanding = () => {
4645
label: (
4746
<>
4847
{IAM_LABEL}
49-
{showLimitedAvailabilityBadges ? (
48+
{showNewBadge ? (
5049
<NewFeatureChip sx={{ position: 'relative', top: -1 }} />
5150
) : null}
5251
</>

packages/manager/src/features/IAM/Shared/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export const ERROR_STATE_TEXT =
7575

7676
// Delegation error messages
7777
export const NO_ITEMS_TO_DISPLAY_TEXT = 'No items to display.';
78-
export const NO_DELEGATED_USERS_TEXT = 'No users added.';
7978

8079
// Links
8180
export const IAM_DOCS_LINK =

packages/manager/src/features/IAM/Users/UserDelegations/UserDelegationsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { TableRow } from 'src/components/TableRow';
2020
import { TableRowEmpty } from 'src/components/TableRowEmpty/TableRowEmpty';
2121
import { TableSortCell } from 'src/components/TableSortCell';
2222
import { useIsIAMDelegationEnabled } from 'src/features/IAM/hooks/useIsIAMEnabled';
23-
import { NO_DELEGATED_USERS_TEXT } from 'src/features/IAM/Shared/constants';
23+
import { NO_ITEMS_TO_DISPLAY_TEXT } from 'src/features/IAM/Shared/constants';
2424
import { useOrderV2 } from 'src/hooks/useOrderV2';
2525
import { usePaginationV2 } from 'src/hooks/usePaginationV2';
2626

@@ -130,7 +130,7 @@ export const UserDelegationsTable = () => {
130130
</TableHead>
131131
<TableBody>
132132
{childAccounts?.data.length === 0 && (
133-
<TableRowEmpty colSpan={1} message={NO_DELEGATED_USERS_TEXT} />
133+
<TableRowEmpty colSpan={1} message={NO_ITEMS_TO_DISPLAY_TEXT} />
134134
)}
135135
{childAccounts?.data?.map((childAccount) => (
136136
<TableRow key={childAccount.euuid}>

packages/manager/src/features/IAM/Users/UserDetailsLanding.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ export const UserDetailsLanding = () => {
2626
const flags = useFlags();
2727
const theme = useTheme();
2828
const { isIAMEnabled } = useIsIAMEnabled();
29-
const showLimitedAvailabilityBadges =
30-
flags.iamLimitedAvailabilityBadges && isIAMEnabled;
29+
const showNewBadge = flags.iamNewBadge && isIAMEnabled;
3130
const { username } = useParams({ from: '/iam/users/$username' });
3231
const { isIAMDelegationEnabled } = useIsIAMDelegationEnabled();
3332
const { isParentUserType } = useDelegationRole();
@@ -68,7 +67,7 @@ export const UserDetailsLanding = () => {
6867
label: (
6968
<>
7069
{IAM_LABEL}
71-
{showLimitedAvailabilityBadges ? (
70+
{showNewBadge ? (
7271
<NewFeatureChip
7372
component="span"
7473
sx={{ position: 'relative', top: -1 }}

packages/manager/src/features/TopMenu/UserMenu/UserMenuPopover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface MenuLink {
5151
export const UserMenuPopover = (props: UserMenuPopoverProps) => {
5252
const { anchorEl, isDrawerOpen, onClose, onDrawerOpen } = props;
5353
const sessionContext = React.useContext(switchAccountSessionContext);
54-
const { limitsEvolution, iamLimitedAvailabilityBadges } = useFlags();
54+
const { limitsEvolution, iamNewBadge } = useFlags();
5555
const {
5656
isProxyOrDelegateUserType,
5757
isParentUserType,
@@ -142,7 +142,7 @@ export const UserMenuPopover = (props: UserMenuPopoverProps) => {
142142
{
143143
display: isIAMEnabled ? 'Identity & Access' : 'Users & Grants',
144144
to: isIAMEnabled ? '/iam' : '/users',
145-
isNew: isIAMEnabled && iamLimitedAvailabilityBadges,
145+
isNew: isIAMEnabled && iamNewBadge,
146146
},
147147
{
148148
display: 'Quotas',
@@ -166,7 +166,7 @@ export const UserMenuPopover = (props: UserMenuPopoverProps) => {
166166
to: '/account-settings',
167167
},
168168
],
169-
[isIAMEnabled, limitsEvolution, iamLimitedAvailabilityBadges]
169+
[isIAMEnabled, limitsEvolution, iamNewBadge]
170170
);
171171

172172
const renderLink = (link: MenuLink) => {

0 commit comments

Comments
 (0)