Skip to content

Commit cdbcd62

Browse files
authored
Merge pull request #919 from amitamrutiya/fix-getting-started
fix: Corrected progress percentage calculation in the Getting Started card
2 parents fac3b59 + ea4279c commit cdbcd62

3 files changed

Lines changed: 26 additions & 7 deletions

File tree

src/custom/DashboardWidgets/GettingStartedWidget/ActionButtonCard.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ const DescriptionTypography = styled(Typography)<{ maxWidth?: string }>(({ theme
5959
marginLeft: theme.spacing(1),
6060
marginBottom: theme.spacing(1),
6161
minHeight: '4.5rem',
62-
[theme.breakpoints.between('sm', 'lg')]: {
62+
maxWidth: '100%',
63+
[theme.breakpoints.up('xs')]: {
64+
maxWidth: '100%'
65+
},
66+
[theme.breakpoints.up('sm')]: {
6367
maxWidth: maxWidth || '100%'
68+
},
69+
[theme.breakpoints.up('lg')]: {
70+
maxWidth: '100%'
6471
}
6572
}));
6673

src/custom/DashboardWidgets/GettingStartedWidget/GetStartedModal.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interface GetStartedModalProps {
6565
handleOpen: () => void;
6666
stepsData: StepData[];
6767
profileData: ProfileData;
68-
useUpdateUserPrefMutation: () => [(arg: { mapObject: any }) => void, any];
68+
useUpdateUserPrefMutation: any;
6969
useGetOrgsQuery: any;
7070
currentOrgId: string;
7171
useGetUserOrgRolesQuery: any;
@@ -74,6 +74,7 @@ interface GetStartedModalProps {
7474
isAssignUserRolesAllowed: boolean;
7575
useLazyGetTeamsQuery: any;
7676
embedDesignPath: string;
77+
isFromMeshery: boolean;
7778
}
7879

7980
const Loading: React.FC<LoadingProps> = ({ showModal, handleClose, style }) => {
@@ -164,7 +165,8 @@ const GetStartedModal: React.FC<GetStartedModalProps> = ({
164165
useNotificationHandlers,
165166
isAssignUserRolesAllowed,
166167
useLazyGetTeamsQuery,
167-
embedDesignPath
168+
embedDesignPath,
169+
isFromMeshery
168170
}) => {
169171
const [openModal, setOpenModal] = useState<boolean>(false);
170172
const [clicked, setClicked] = useState<number | undefined>(undefined);
@@ -191,9 +193,14 @@ const GetStartedModal: React.FC<GetStartedModalProps> = ({
191193
: [...completedSteps, id]
192194
}
193195
};
194-
updatePref({
195-
mapObject: completeWelcome
196-
});
196+
// different api use for the cloud and meshery
197+
if (isFromMeshery) {
198+
updatePref(completeWelcome);
199+
} else {
200+
updatePref({
201+
mapObject: completeWelcome
202+
});
203+
}
197204
if (id === 3) {
198205
setInviteModal(true);
199206
} else {

src/custom/ShareModal/ShareModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ const AccessList: React.FC<AccessListProps> = ({
9393
<ListItemText
9494
primary={`${actorData.first_name || ''} ${actorData.last_name || ''}`}
9595
secondary={actorData.email}
96+
secondaryTypographyProps={{
97+
sx: {
98+
color: theme.palette.background.neutral?.pressed
99+
}
100+
}}
96101
/>
97102
<ListItemSecondaryAction>
98103
{ownerData.id === actorData.id ? (
@@ -293,7 +298,7 @@ const ShareModal: React.FC<ShareModalProps> = ({
293298
</CustomSelect>
294299
<Typography
295300
sx={{
296-
color: theme.palette.text.secondary
301+
color: theme.palette.background.neutral?.pressed
297302
}}
298303
component="span"
299304
variant="body2"

0 commit comments

Comments
 (0)