Skip to content

Commit 2b11420

Browse files
authored
Merge branch 'master' into fix-collab
2 parents 818f87d + 2e32cab commit 2b11420

34 files changed

Lines changed: 349 additions & 127 deletions

CONTRIBUTING-gitflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ While this isn't an absolutely necessary step, if you plan on doing anything mor
1414
## Add 'upstream' repo to list of remotes
1515

1616
```
17-
git remote add upstream https://github.com/layer5io/meshery.git
17+
git remote add upstream https://github.com/layer5io/sistent.git
1818
```
1919

20-
("meshery" is used as the example repo. Be sure to reference the _actual_ repo you're contributing to e.g. "meshery-linkerd").
20+
Note: Replace "sistent" with the actual repository name if contributing to a different project under Layer5, such as "docs"
2121

2222
## Verify the new remote named 'upstream'
2323

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ build:
6767

6868
```
6969
attach sistent to your project:
70-
npm install [path to sistent repo ]
70+
npm install <path-to-sistent-on-local-machine>
7171
```
7272

7373
> [!NOTE]

package-lock.json

Lines changed: 3 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,28 +78,12 @@
7878
"typescript": "^5.3.3"
7979
},
8080
"peerDependencies": {
81-
"@emotion/react": "^11.11.3",
82-
"@emotion/styled": "^11.11.0",
83-
"@mui/material": "^5.15.11",
8481
"@xstate/react": "^4.1.1",
85-
"lodash": "^4.17.21",
8682
"react": ">=17",
8783
"react-dom": ">=17",
8884
"xstate": "^5.18.2"
8985
},
9086
"peerDependenciesMeta": {
91-
"lodash": {
92-
"optional": true
93-
},
94-
"@emotion/react": {
95-
"optional": true
96-
},
97-
"@emotion/styled": {
98-
"optional": true
99-
},
100-
"@mui/material": {
101-
"optional": true
102-
},
10387
"react": {
10488
"optional": true
10589
},
@@ -111,6 +95,9 @@
11195
"access": "public"
11296
},
11397
"dependencies": {
98+
"@emotion/react": "^11.11.3",
99+
"@emotion/styled": "^11.11.0",
100+
"@mui/material": "^5.15.11",
114101
"@layer5/meshery-design-embed": "^0.4.0",
115102
"billboard.js": "^3.14.3",
116103
"js-yaml": "^4.1.0",

src/custom/CatalogDetail/OverviewSection.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
6969
handleCopyUrl={handleCopyUrl}
7070
showShareAction={showShareAction}
7171
handleShare={handleShare}
72-
isVisibilityEnabled={isVisibilityEnabled}
73-
handleVisibilityChange={handleVisibilityChange}
7472
/>
7573
</div>
7674
<Grid container spacing={2}>
@@ -85,7 +83,13 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
8583
/>
8684
</ContentRow>
8785
)}
88-
<UserInfo details={details} showVersion={showVersion} userProfile={userProfile} />
86+
<UserInfo
87+
details={details}
88+
showVersion={showVersion}
89+
userProfile={userProfile}
90+
isVisibilityEnabled={isVisibilityEnabled}
91+
handleVisibilityChange={handleVisibilityChange}
92+
/>
8993
</Grid>
9094
</Grid>
9195
</Grid>

src/custom/CatalogDetail/SocialSharePopper.tsx

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
import React, { useState } from 'react';
2-
3-
import {
4-
ChainIcon,
5-
FacebookIcon,
6-
LinkedinIcon,
7-
LockIcon,
8-
PublicIcon,
9-
ShareIcon,
10-
TwitterIcon
11-
} from '../../icons';
2+
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from 'react-share';
3+
import { Box, IconButton, Menu, MenuItem, Typography } from '../../base';
4+
import { ChainIcon, FacebookIcon, LinkedinIcon, ShareIcon, TwitterIcon } from '../../icons';
125
import { useTheme } from '../../theme';
136
import { Pattern } from '../CustomCatalog/CustomCard';
147
import { CustomTooltip } from '../CustomTooltip';
158
import { ErrorBoundary } from '../ErrorBoundary';
16-
17-
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from 'react-share';
18-
import { Box, IconButton, Menu, MenuItem, Typography } from '../../base';
19-
import { VisibilityChipMenu } from '../VisibilityChipMenu';
20-
import { VIEW_VISIBILITY } from '../VisibilityChipMenu/VisibilityChipMenu';
219
import { CopyShareIconWrapper, ShareButton, ShareButtonGroup, ShareSideButton } from './style';
2210

2311
interface SocialSharePopperProps {
@@ -29,8 +17,6 @@ interface SocialSharePopperProps {
2917
handleCopyUrl: (type: string, name: string, id: string) => void;
3018
showShareAction: boolean;
3119
handleShare: () => void;
32-
isVisibilityEnabled: boolean;
33-
handleVisibilityChange: (visibility: VIEW_VISIBILITY) => void;
3420
}
3521

3622
const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
@@ -40,9 +26,7 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
4026
title,
4127
getUrl,
4228
handleCopyUrl,
43-
handleShare,
44-
isVisibilityEnabled,
45-
handleVisibilityChange
29+
handleShare
4630
}) => {
4731
const theme = useTheme();
4832
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
@@ -61,16 +45,6 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
6145
return (
6246
<ErrorBoundary>
6347
<CopyShareIconWrapper style={{ marginBottom: '2rem' }}>
64-
<VisibilityChipMenu
65-
value={details?.visibility as VIEW_VISIBILITY}
66-
onChange={(value) => handleVisibilityChange(value as VIEW_VISIBILITY)}
67-
enabled={isVisibilityEnabled}
68-
options={[
69-
[VIEW_VISIBILITY.PUBLIC, PublicIcon],
70-
[VIEW_VISIBILITY.PRIVATE, LockIcon]
71-
]}
72-
/>
73-
7448
<ShareButtonGroup variant="contained">
7549
<CustomTooltip title="Change access and visibility">
7650
<ShareButton variant="contained" onClick={handleShare}>

src/custom/CatalogDetail/UserInfo.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Avatar } from '../../base';
22
import { CLOUD_URL } from '../../constants/constants';
3+
import { LockIcon, PublicIcon } from '../../icons';
34
import { Pattern } from '../CustomCatalog/CustomCard';
45
import { getVersion } from '../CustomCatalog/Helper';
6+
import { VisibilityChipMenu } from '../VisibilityChipMenu';
7+
import { VIEW_VISIBILITY } from '../VisibilityChipMenu/VisibilityChipMenu';
58
import { formatDate } from './helper';
69
import { ContentDetailsPoints, ContentDetailsText, ContentRow, RedirectLink } from './style';
710
import { UserProfile } from './types';
@@ -10,9 +13,17 @@ interface UserInfoProps {
1013
details: Pattern;
1114
showVersion?: boolean;
1215
userProfile?: UserProfile;
16+
isVisibilityEnabled: boolean;
17+
handleVisibilityChange: (visibility: VIEW_VISIBILITY) => void;
1318
}
1419

15-
const UserInfo: React.FC<UserInfoProps> = ({ details, showVersion = true, userProfile }) => {
20+
const UserInfo: React.FC<UserInfoProps> = ({
21+
details,
22+
showVersion = true,
23+
userProfile,
24+
isVisibilityEnabled,
25+
handleVisibilityChange
26+
}) => {
1627
return (
1728
<>
1829
<ContentRow>
@@ -57,6 +68,18 @@ const UserInfo: React.FC<UserInfoProps> = ({ details, showVersion = true, userPr
5768
<ContentDetailsText>{getVersion(details)}</ContentDetailsText>
5869
</ContentRow>
5970
)}
71+
<ContentRow>
72+
<ContentDetailsPoints>VISIBILITY</ContentDetailsPoints>
73+
<VisibilityChipMenu
74+
value={details?.visibility as VIEW_VISIBILITY}
75+
onChange={(value) => handleVisibilityChange(value as VIEW_VISIBILITY)}
76+
enabled={isVisibilityEnabled}
77+
options={[
78+
[VIEW_VISIBILITY.PUBLIC, PublicIcon],
79+
[VIEW_VISIBILITY.PRIVATE, LockIcon]
80+
]}
81+
/>
82+
</ContentRow>
6083
</>
6184
);
6285
};

src/custom/CustomTooltip/customTooltip.tsx

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash';
12
import React from 'react';
23
import { Tooltip, TooltipProps } from '../../base';
34
import { WHITE } from '../../theme';
@@ -11,6 +12,7 @@ type CustomTooltipProps = {
1112
fontWeight?: number;
1213
variant?: 'standard' | 'small';
1314
bgColor?: string;
15+
componentsProps?: TooltipProps['componentsProps'];
1416
} & Omit<TooltipProps, 'title' | 'onClick'>;
1517

1618
function CustomTooltip({
@@ -22,34 +24,39 @@ function CustomTooltip({
2224
fontWeight = 400,
2325
variant = 'standard',
2426
bgColor = '#141414',
27+
componentsProps = {},
2528
...props
2629
}: CustomTooltipProps): JSX.Element {
2730
return (
2831
<Tooltip
29-
componentsProps={{
30-
tooltip: {
31-
sx: {
32-
background: bgColor,
33-
color: WHITE,
34-
fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'),
35-
fontWeight: { fontWeight },
36-
borderRadius: '0.5rem',
37-
padding: variant === 'standard' ? '0.9rem' : '0.5rem 0.75rem',
38-
boxShadow: 'rgba(0, 0, 0, 0.6) 0px 4px 10px, rgba(0, 0, 0, 0.5) 0px 2px 4px'
32+
componentsProps={_.merge(
33+
{
34+
tooltip: {
35+
sx: {
36+
background: bgColor,
37+
color: WHITE,
38+
maxWidth: '600px',
39+
fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'),
40+
fontWeight: { fontWeight },
41+
borderRadius: '0.5rem',
42+
padding: variant === 'standard' ? '0.9rem' : '0.5rem 0.75rem',
43+
boxShadow: 'rgba(0, 0, 0, 0.6) 0px 4px 10px, rgba(0, 0, 0, 0.5) 0px 2px 4px'
44+
}
45+
},
46+
popper: {
47+
sx: {
48+
zIndex: 9999999999,
49+
opacity: '1'
50+
}
51+
},
52+
arrow: {
53+
sx: {
54+
color: bgColor
55+
}
3956
}
4057
},
41-
popper: {
42-
sx: {
43-
zIndex: 9999999999,
44-
opacity: '1'
45-
}
46-
},
47-
arrow: {
48-
sx: {
49-
color: bgColor
50-
}
51-
}
52-
}}
58+
componentsProps
59+
)}
5360
title={typeof title === 'string' ? <RenderMarkdownTooltip content={title} /> : title}
5461
placement={placement}
5562
arrow

src/custom/DashboardWidgets/GettingStartedWidget/ActionButtonCard.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const BoxContainer = styled(Card)<{ playgroundCardBackgroundImgSrc?: string }>(
2929
backgroundPosition: 'right bottom',
3030
backgroundSize: 'cover',
3131
backgroundRepeat: 'no-repeat',
32-
minWidth: 285,
3332
height: '100%',
3433
position: 'relative',
3534
backgroundColor:
@@ -38,7 +37,6 @@ const BoxContainer = styled(Card)<{ playgroundCardBackgroundImgSrc?: string }>(
3837
);
3938

4039
const StyledCard = styled(Card)(({ theme }) => ({
41-
minWidth: 275,
4240
height: '100%',
4341
backgroundColor:
4442
theme.palette.mode === 'dark' ? theme.palette.background.card : theme.palette.common.white

src/custom/DashboardWidgets/PlainCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { OpenInNewIcon } from '../../icons';
33
import { styled } from '../../theme';
44

55
const StyledCard = styled(Card)(({ theme }) => ({
6-
minWidth: 275,
76
height: '100%',
87
backgroundColor:
98
theme.palette.mode === 'dark' ? theme.palette.background.card : theme.palette.common.white

0 commit comments

Comments
 (0)